Monday, July 16, 2018

#1 2011-02-05 10:58:34 pm

AudialRedux
Member
Registered: 2010-12-08
Posts: 45

Help! Please! Im Begging You!

OK, I Need help with file exists..

im making a program that is free & full in one app

EG IF FREE VERSION:
an if the applescript cant find This File "/tmp/4389734987_33" i want the  contents of text field to change to "Free Version"
--
CURRENT CODE: (ITS NOT WORKING! sad )

Applescript:

tell application "Finder" to if not exists "/tmp/4389734987_33" as POSIX file then set
set freeversion to "FREE" set contents of text field "text" of window "main" to freeversion

EG IF FULL VERSION:
an if the applescript can find This File "/tmp/4389734987_33" i want the  contents of text field to change to "Free Version"
--
CURRENT CODE: (ITS NOT WORKING! sad )

Applescript:

tell application "Finder" to if exists "/tmp/4389734987_33" as POSIX file then set
set fullversion to "FULL" set contents of text field "text" of window "main" to fullversion

PLEASE HELP!!!!!!

Offline

 

#2 2011-02-06 03:16:21 am

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11499
Website

Re: Help! Please! Im Begging You!

Hi,

your script syntax looks a bit confusing, try this

Applescript:


tell application "Finder" to set fileExists to exists "/tmp/4389734987_33" as POSIX file
if fileExists then
   set string value of text field "text" of window "main" to "FULL"
else
   set string value of text field "text" of window "main" to "FREE"
end if


regards

Stefan

Offline

 

#3 2011-02-06 08:53:20 pm

AudialRedux
Member
Registered: 2010-12-08
Posts: 45

Re: Help! Please! Im Begging You!

Omg Thank You So Much!!!!! You Saved The Life Of My Program!!!

Im In Det To You So Much.:d

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)