tap.applescript setting global

1 view
Skip to first unread message

div

unread,
Oct 12, 2009, 6:48:32 AM10/12/09
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

Timothy Place

unread,
Oct 22, 2009, 10:42:46 AM10/22/09
to elect...@googlegroups.com
Thanks for the report -- I'll look into it.
best,
 Tim

Cycling '74 | Electrotap | 74Objects
http://blog.74objects.com
Reply all
Reply to author
Forward
0 new messages