Is there a way to turn a number (which I’ve snatched up into the clipboard from a webpage) into a value? I’m trying to write an IF statement that does one thing if this number is greater then 20000, and another if not.
I’m probably way off here, but I hope I haven’t slaughtered this too much… Mayeb you guys’ll get a laugh out of it.
tell application "System Events"
set clip to «class ktxt» of ((the clipboard as text) as record)
set txtleng to the length of clip
repeat with i from txtleng to 1 by -1
if (character (i) of clip) is not equal to "," then exit repeat
end repeat
if i is equal to 1 then
set clip to ""
else
copy (text (1) thru (i) of clip) to clip
end if
set z to value of clip
if z is less than "20000" then
tell application "System Events"
keystroke "w" using command down
delay 0.2
end tell
else if z is greater than "20000" then
tell application "System Events"
keystroke (tab) using control down
end tell
end if
set z to 0
end tell