Jump to content
Sign in to follow this  
Vision

Some help with if questions

Recommended Posts

hi :)

can someone help me with this script ?

my script wont work and i dont know how to do it :/

is there a function calling Wait till $blabla is = my value?

here my script:

;------------------G L O B A L S-----------------------
Global $Paused  
;------------------H O T K E Y S-----------------------
HotKeySet("{ESC}", "Terminate")
HotKeySet("{PAUSE}", "TogglePause")
;------------------P A U S E---------------------------

While 1
    


$join = PixelGetColor( 702, 183)
$checkw = PixelGetColor( 491, 804)
$checka = PixelGetColor( 659, 794)

####################################################


 NOW  I WILL DO THIS ACTION:

IF $checkw = xy or $checka =xx  then 
Sleep(60000)
CHECK AGAIN TILL IS NOT $checkw = xy or $checka = xx
THEN
do HERE SOME CLICKS
THEN
 CHECK  IF $join = xxx Then
CLICK
CHECK AGAIN TILL  $join = xxx


################################################


WEnd

;------------------P A U S E---------------------------
Func TogglePause()                                   
    $Paused = NOT $Paused                            
    While $Paused                                    
        sleep(100)                                   
        ToolTip('Script is "Paused"',0,0)            
    WEnd                                             
    ToolTip("")                                      
EndFunc                                              
;------------------------------------------------------
;----------------------E S C---------------------------
Func Terminate()                                     
    Exit 0                                           
EndFunc

can someone help me :? i dont kow how to to this

thanks in advance

Edited by Vision

Share this post


Link to post
Share on other sites

hi :)

can someone help me with this script ?

my script wont work and i dont know how to do it :/

is there a function calling Wait till $blabla is = my value?

here my script:

;------------------G L O B A L S-----------------------
Global $Paused  
;------------------H O T K E Y S-----------------------
HotKeySet("{ESC}", "Terminate")
HotKeySet("{PAUSE}", "TogglePause")
;------------------P A U S E---------------------------

While 1
    


$join = PixelGetColor( 702, 183)
$checkw = PixelGetColor( 491, 804)
$checka = PixelGetColor( 659, 794)

####################################################


 NOW  I WILL DO THIS ACTION:

IF $checkw = xy or $checka =xx  then 
Sleep(60000)
CHECK AGAIN TILL IS NOT $checkw = xy or $checka = xx
THEN
do HERE SOME CLICKS
THEN
 CHECK  IF $join = xxx Then
CLICK
CHECK AGAIN TILL  $join = xxx


################################################


WEnd

;------------------P A U S E---------------------------
Func TogglePause()                                   
    $Paused = NOT $Paused                            
    While $Paused                                    
        sleep(100)                                   
        ToolTip('Script is "Paused"',0,0)            
    WEnd                                             
    ToolTip("")                                      
EndFunc                                              
;------------------------------------------------------
;----------------------E S C---------------------------
Func Terminate()                                     
    Exit 0                                           
EndFunc

can someone help me :? i dont kow how to to this

thanks in advance

You just need Do..Until, see the help.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Maybe this can get you started..

;------------------G L O B A L S-----------------------
Global $Paused
Global $color1 = "xxx1" 
Global $color2 = "xxx2" 
Global $color3 = "xxx3" 

;------------------H O T K E Y S-----------------------
HotKeySet("{ESC}", "Terminate")
HotKeySet("{PAUSE}", "TogglePause")

;------------------P A U S E---------------------------

While 1



    $join = PixelGetColor(702, 183)
    $checkw = PixelGetColor(491, 804)
    $checka = PixelGetColor(659, 794)

    ;####################################################


    ; NOW  I WILL DO THIS ACTION:

    While $checkw = $color1 Or $checka = $color2
        Sleep(60000)
        $checkw = PixelGetColor(491, 804)
        $checka = PixelGetColor(659, 794)
    WEnd

    MouseClick("left", 491, 804)
    ; more mouse clicks ????


    If $join = $color3 Then
        Do
            MouseClick("left", 702, 183)
        Until $join <> $color3
    EndIf


    ;################################################


WEnd

;------------------P A U S E---------------------------
Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('Script is "Paused"', 0, 0)
    WEnd
    ToolTip("")
EndFunc   ;==>TogglePause
;------------------------------------------------------
;----------------------E S C---------------------------
Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

8)

Share this post


Link to post
Share on other sites

hi :)

can someone help me with this script ?

my script wont work and i dont know how to do it :/

is there a function calling Wait till $blabla is = my value?

maby something like this

Global $Paused    
HotKeySet("{ESC}", "Terminate")
HotKeySet("{PAUSE}", "TogglePause")

$clolor2=""
$color3=""
$color1=""

While 1
    $join = PixelGetColor( 702, 183)
    $checkw = PixelGetColor( 491, 804)
    $checka = PixelGetColor( 659, 794)
    
    IF $checkw = xy or $checka =xx  then 
        Sleep(60000)
    WEnd

    Do
        ;<==what todo
    Until $checkw <> $clolor2 or $checka = $color3
    
    MouseClick()
    
    IF $join = xxx Then
        MouseClick()
    EndIf
    Do
        ;<==what todo
    Until $join = $color1
WEnd

Func TogglePause()                                     
    $Paused = NOT $Paused                             
    While $Paused                                     
        sleep(100)                                     
        ToolTip('Script is "Paused"',0,0)             
    WEnd                                             
    ToolTip("")                                         
EndFunc

Func Terminate()                                     
    Exit 0                                             
EndFunc

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...