Jump to content

help


 Share

Recommended Posts

hello, im new to autoit but ive been seeing it a while. i got stuck trying to make one method here is my code

HotKeySet("a","any")
while 1
       Sleep(100)
WEnd


func any()
    

if mouseclick("left",793,232) Then            ;this values r yust examples, here is where i want the program to accept the mouse move and send up  or if i dont 
$value=send({up})                                   do the command then send left and if i press enter the program stay with whaterver  answer i gave 
ElseIf not mouseclick("left",793,232) Then   and pass down to winwaitactive 
$oldValue=send({left})  
EndIf

if mouseclick("left",200,232) Then            ;this values r yust examples yust like explanation up 
$value=send({up})
ElseIf not mouseclick("left",793,232) Then
$oldValue=send({left})  
EndIf

if _IsPressed("0D") Then
WinWaitActive("Quality RO - qropatch")
EndIf

EndFunc

ok here is what i want my program to do :

when i press the a button my program will jump to function any but i want it to wait where the if commands r and if want to do the mouseclick or not doesnt matter, but if i press enter the the program has to go down to if _IsPressed("0D") Then winwait active.....

any ideas on how to do it

Link to comment
Share on other sites

hello, im new to autoit but ive been seeing it a while. i got stuck trying to make one method here is my code

HotKeySet("a","any")
while 1
       Sleep(100)
WEnd


func any()
    

if mouseclick("left",793,232) Then           ;this values r yust examples, here is where i want the program to accept the mouse move and send up  or if i dont 
$value=send({up})                                   do the command then send left and if i press enter the program stay with whaterver  answer i gave 
ElseIf not mouseclick("left",793,232) Then   and pass down to winwaitactive 
$oldValue=send({left})  
EndIf

if mouseclick("left",200,232) Then           ;this values r yust examples yust like explanation up 
$value=send({up})
ElseIf not mouseclick("left",793,232) Then
$oldValue=send({left})  
EndIf

if _IsPressed("0D") Then
WinWaitActive("Quality RO - qropatch")
EndIf

EndFunc

ok here is what i want my program to do :

when i press the a button my program will jump to function any but i want it to wait where the if commands r and if want to do the mouseclick or not doesnt matter, but if i press enter the the program has to go down to if _IsPressed("0D") Then winwait active.....

any ideas on how to do it

Hy I am not quite shure where your Prob lies, since you seemed to have missed the "" it should be oldValue=send("{left}") not oldValue=send({left})

And a Case function won't probablly do the trick?!

tried that?

Link to comment
Share on other sites

#Include <Misc.au3>

HotKeySet("a","any")

Global $keypressed

while 1
       Sleep(100)
WEnd


func any()
ConsoleWrite("Key A Pressed")
$keypressed=False 

do 

if _ispressed("01") Then
mouseclick("left",793,232)       
send("{up}")                          
$keypressed=True
EndIf

if _IsPressed("0D") Then
WinWaitActive("Quality RO - qropatch")
$keypressed=True
EndIf

until $keypressed=True
EndFunc

this is not fully what you want, but i can be changed to suit your need as i dont fully understand what it is you want

Link to comment
Share on other sites

hello, im new to autoit but ive been seeing it a while. i got stuck trying to make one method here is my code

HotKeySet("a","any")
while 1
       Sleep(100)
WEnd


func any()
    

if mouseclick("left",793,232) Then           ;this values r yust examples, here is where i want the program to accept the mouse move and send up  or if i dont 
$value=send({up})                                   do the command then send left and if i press enter the program stay with whaterver  answer i gave 
ElseIf not mouseclick("left",793,232) Then   and pass down to winwaitactive 
$oldValue=send({left})  
EndIf

if mouseclick("left",200,232) Then           ;this values r yust examples yust like explanation up 
$value=send({up})
ElseIf not mouseclick("left",793,232) Then
$oldValue=send({left})  
EndIf

if _IsPressed("0D") Then
WinWaitActive("Quality RO - qropatch")
EndIf

EndFunc

ok here is what i want my program to do :

when i press the a button my program will jump to function any but i want it to wait where the if commands r and if want to do the mouseclick or not doesnt matter, but if i press enter the the program has to go down to if _IsPressed("0D") Then winwait active.....

any ideas on how to do it

Your explanation and your code are quite confused. Fix these basics, then you'll be able to ask a clearer question if you need more help:

1. The code "If MouseClick() Then" does not tell you if the operator clicked the mouse. It only tells you if simulated mouse click was performed or not. Perhaps you were looking for "If IsPressed('01') Then" (as Aceguy shows).

2. Also as Aceguy pointed out, the syntax for named keys is Send("{UP}") or Send("{LEFT}").

3. Send() does not return anything useful either, so your $value and $oldValue variables don't mean anything.

4. The sloppy state of your code indicates you are taking advantage of the full SciTE editor and Tidy (included with it). You should download and use it, your AutoIt scripting life really will be much happier!

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...