Jump to content

Problem with send function


LongSky
 Share

Recommended Posts

Hi every one,

the button o of my keyboard doesen't work

so I'm trying to write a script for intercept another button pression and change the output with send function.

but after the first execution of pausa function, write_oo function doesen't send anythings (in my case doesen't send ">" );

I really don't know how to fix.

Any tips or solution.

Thanks and sorry for my english.

 

 

here the script

#include-once <Misc.au3>

HotKeySet("{ESC}","stop")
HotKeySet("{<}","write_o")
HotKeySet("+{<}","write_oo")
HotKeySet("+{SPACE}","pausa")

Global $p = 1

while(1)
   sleep(1000)
WEnd

Func stop()
   Exit 0
EndFunc

Func write_o()
   If($p=1) then
      Send("o")
   Else
      Send("{ASC 060}")
   EndIf
EndFunc

Func write_oo()
   If($p=1) then
      Send("O")
   Else
      Send("{ASC 062}")
   EndIf
EndFunc

Func pausa()
   $p=1-$p
EndFunc

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...