div
unread,Oct 12, 2009, 6:48:32 AM10/12/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ElectroTap
Hi I am using tap.applescript to control the apple chess application.
I have a simple problem i think.
when i set the global in my script using
script set mv1 to \"white pawn\, e2\"
nothing happens anymore, what is happening inside the applescript
object?
It seems quite a simple thing no?
Something is happening to the script when I
global k
global mv1
global mv2
set mv1 to "white pawn, e2"
set mv2 to "e4"
set k to 0
tell application "Chess" to activate
tell application "System Events" to tell process "Chess"
keystroke "l" using {command down}
keystroke "n" using {command down}
click button "Start" of sheet 1 of window 1
set theNameOfLogW to name of window 1
set theNameofGameW to name of window 2
click last menu item of menu 1 of menu bar item 5 of menu bar 1
delay 1
click button mv1 of group 1 of window 1
click button mv2 of group 1 of window 1
end tell
on whiteMove(a, b)
tell application "System Events" to tell process "Chess"
tell group 1 of window 1
set k to k + 1
click button a
click button b
end tell
tell table 1 of scroll area 1 of window 2
repeat until row k exists
end repeat
repeat while value of text field 3 of row k is ""
end repeat
(*return value of text field 3 of row k*)
end tell
end tell
end whiteMove