FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Keyboard in Progess yet help needed

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Mac
View previous topic :: View next topic  
Author Message
lukefletcher
Newbie


Joined: 21 Apr 2006
Posts: 4

PostPosted: Fri Apr 21, 2006 10:26 am    Post subject: Keyboard in Progess yet help needed Reply with quote

Hi Everyone, I am working on a keyboard function for Salling Clicker.
by Keyboard i mean a set of scripts that can type figures onto the computer. Here is what i have written so far.

[color=orange]tell application "SEC Helper"

--Define X [/color]
[color=red]--I NEED HELP HERE [/color]
[color=orange]set x to 1

--Type first character

if x is equal to 1 then
tell application "SEC Helper"
simulate keyboard virtual keycode 0
end tell
tell application "SEC Helper" to set x to 2
return
end if

--Type second character

set x to 2

if x is equal to 2 then
tell application "SEC Helper"
simulate keyboard virtual keycode 51
simulate keyboard virtual keycode 11
end tell
tell application "SEC Helper" to set x to 3
return
end if

--Type third character

set x to 3

if x is equal to 3 then
tell application "SEC Helper"
simulate keyboard virtual keycode 51
simulate keyboard virtual keycode 8
end tell
tell application "SEC Helper" to set x to 1
return
end if

end tell[/color]
So this would type A, B and C. I have a Nokia so i was going to make it work for that. Now the glitch is that i cant make the script type B or C because the 'set x to 1' is there and it wont work when i remove it.
SOLUTION:
Can anyone tell me how to type Shift-Left Arrow Key to select the letter before and set it to y and i can then write a rule like
If y is equal to A
Type B

If y is equal to B
type C

Thanx
Back to top
View user's profile Send private message
lukefletcher
Newbie


Joined: 21 Apr 2006
Posts: 4

PostPosted: Sat Apr 22, 2006 11:34 pm    Post subject: Good News Reply with quote

Good News everyone.
I have just about got the script working, except for the fact that i need a line that goes like this. Jonas could you help me out on this one.

set x to ((selection) as string)

so effectivly, this will set x to whatever is highlighted.
I made a script that will type left and hold shift and right to select the last character but i need to set that last character to X.
Please i need help.
Script will be posted when i get it working

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Mac All times are GMT + 2 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
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group