| View previous topic :: View next topic |
| Author |
Message |
jasonsmark
Joined: 04 Apr 2008 Posts: 2 Location: TAMPA
|
Posted: Fri Apr 04, 2008 11:24 am Post subject: Applescript Query Troubles |
|
|
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 |
|
 |
michaeldupuis Site Admin
Joined: 15 May 2003 Posts: 1427 Location: Lewiston, ME
|
Posted: Fri Apr 04, 2008 9:16 pm Post subject: |
|
|
| 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 |
|
 |
jasonsmark
Joined: 04 Apr 2008 Posts: 2 Location: TAMPA
|
Posted: Tue Apr 08, 2008 7:31 am Post subject: Compiled? |
|
|
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 |
|
 |
|