FAQ  •  Search  •  Memberlist  •  Usergroups   •  Register  •  Profile  •  Log in to check your private messages  •  Log in

Applescript Query Troubles

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Advenio Support Forum Index -> SQLGrinder Discussion
View previous topic :: View next topic  
Author Message
jasonsmark



Joined: 04 Apr 2008
Posts: 2
Location: TAMPA

PostPosted: Fri Apr 04, 2008 11:24 am    Post subject: Applescript Query Troubles Reply with quote

Hello,

The following script worked in 10.4 but the set contents of frontdocument doesn't work. Is there a better way? execute sql command?

tell application "SQLGrinder"

set vFrontDocTF to the exists (front sql editor)
-- Set Query
set the contents of vFrontDoc to vQueryCommand

set vQuerySuccessTF to false
set vWaitTime to 1

-- Execute Query
tell vFrontDoc
if ((vFrontDoc connection is open) is equal to "YES") then
execute editor contents

-- Wait for the result
set vRunningTF to ((vFrontDoc task is running) is equal to "YES")
repeat
if vWaitTime is 180 then
exit repeat
end if
delay 1
if ((vFrontDoc task is running) is equal to "NO") then
set vQuerySuccessTF to true
exit repeat
end if
set vWaitTime to vWaitTime + 1
end repeat
end if
end tell

end tell
Back to top
View user's profile Send private message
michaeldupuis
Site Admin


Joined: 15 May 2003
Posts: 1427
Location: Lewiston, ME

PostPosted: Fri Apr 04, 2008 9:16 pm    Post subject: Reply with quote

Something must have changed in Leopard, I'll have to take a look into it and see if there is an alternative way to do it. I'm not sure why that might have changed though...
Back to top
View user's profile Send private message Visit poster's website
jasonsmark



Joined: 04 Apr 2008
Posts: 2
Location: TAMPA

PostPosted: Tue Apr 08, 2008 7:31 am    Post subject: Compiled? Reply with quote

I noticed that my old script that I haven't opened and recompiled and save still work. I dont' know if that helps.

Jason
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Advenio Support Forum Index -> SQLGrinder Discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group