Estimize

How to use selected text in autoit

20 posts in this topic

I have a program that automatically selects this bit of text and I need it to make a decision based on what this text is. For example here it is "2.18", if it shows this number I need it to repeat the function it just previously executed which is called Click_1(). Also if this value is something else for example "0.00" I need it to go onto the next function which is called Click_2. Any help is appreciated and if I missed any bits of info out which would help you answer my question just let me know. This decision also needs to be made outside of the functions Click_1/2 if possible. Thanks in advance

2.18.png

Share this post


Link to post
Share on other sites



Local $Data, $NewData;variable placeholder for selected text

While 1; make a loop to keep the script running inefinately
    WinActive(name of your program);You will probably want to use this to make the screen with the text the active window
    Send("^c");Send Ctrl + C to copy the copied text
    sleep(250);I add this to give the computer time to copy the data to the clipboard. It may not be necessary
    $NewData = ClipGet();This will read the clipboard data in windows and set it to the variable $data for comparisons
    If $NewData == $Data Then
        Click_1()
        $Data = $NewData
    EndIF
    IF $NewData == 0.00 Then
        Click_2()
        $Data == $NewData
    EndIF
    Sleep(1000);pause the program for 1 second so it doesn't overuse your processor.
WEnd

Func Click1()
    MouseClick("",x1,y1)
EndFunc

Func Click_2()
    MouseClick("",x1,y1)
EndFunc

Haven't tested this but it is how I would write what you are explaining.

1 person likes this

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Local $Data, $NewData;variable placeholder for selected text

While 1; make a loop to keep the script running inefinately
    WinActive(name of your program);You will probably want to use this to make the screen with the text the active window
    Send("^c");Send Ctrl + C to copy the copied text
    sleep(250);I add this to give the computer time to copy the data to the clipboard. It may not be necessary
    $NewData = ClipGet();This will read the clipboard data in windows and set it to the variable $data for comparisons
    If $NewData == $Data Then
        Click_1()
        $Data = $NewData
    EndIF
    IF $NewData == 0.00 Then
        Click_2()
        $Data == $NewData
    EndIF
    Sleep(1000);pause the program for 1 second so it doesn't overuse your processor.
WEnd

Func Click1()
    MouseClick("",x1,y1)
EndFunc

Func Click_2()
    MouseClick("",x1,y1)
EndFunc

Haven't tested this but it is how I would write what you are explaining.

If $NewData == 2.18 Then
        Click_1()
        $Data = $NewData
    EndIF
    IF $NewData == 0.00 Then
        Click_2()
        $Data == $NewData
    EndIF

 

 

is this correct or should what i changed to 2.18 stay as $data  also thanks very much for the help

 

 

Edited by Estimize
misscode

Share this post


Link to post
Share on other sites

It depends on what you want the script to do. Will it run forever? How many values will there be? The code I wrote is made to work forever. If you only want to check the number a few times then leave it at 2.18. Bottom line here is that you need to take what I wrote and test it and make changes and then test it. If you get stuck add more questions to this thread and we will help.


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I am having trouble getting my code to recognise the second if statement any help? My code is shown belowproblems.thumb.png.7c75289e5ba64c4e3b2f7

 

Edited by Estimize
miss click

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Can you copy and paste your code in a code window (its the <> symbols) rather than a blurry screen shot? Thy this. you can use msgbox to debug what is happening in your code to find out why it does not do what you want it to.

#include <MsgBoxConstants.au3>
HotKeySet("{F6}","Terminalte")

Local $Data = 2.18;stored value of what the selected text was as of the last check
Local $NewData;most current value of what is the selected text

Click_1();Run the function Click_1() when the script starts before the while loop

While 1; make a loop to keep the script running inefinately
    If WinExists("Function2") Then
        WinActive("Functions2");You will probably want to use this to make the screen with the text the active window
        Sleep(250)
    Else
        MgBox(0,"Missing Window","Functions2 window is not running")
        Exit 0
    EndIf
    Send("^c");Send Ctrl + C to copy the copied text
    sleep(250);I add this to give the computer time to copy the data to the clipboard. It may not be necessary
    $NewData = ClipGet();This will read the clipboard data in windows and set it to the variable $data for comparisons
    If $NewData == $Data Then;this value starts as 2.18 as declared by line 3
        Click_1()
        $Data = $NewData;Set $Data to 2.18 after Click_1() has been run
    EndIF
    If $NewData == 0.00 Then
        Click_2()
        $Data = $NewData;This will set $Data to 0.00
    EndIF
    If $NewData <> 2.18 and $NewData <> 0.00 Then
        MsgBox(0,"NewData Value not 2.18 or 0.00","The value of $NweData is neither 2.18 nor 0.00. The value of $NewData is: " & $NewData)
        Exit 0
    EndIf   
    Sleep(1000);pause the program for 1 second so it doesn't overuse your processor.
WEnd

Func Click1()
    MouseClick("",x1,y1)
EndFunc

Func Click_2()
    MouseClick("",x1,y1)
EndFunc

Func Terminate()
    Exit 0
EndFunc

 

Edited by computergroove

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

This is the funtions2.au3 page this shouldnt be like the rest of the code sorry
Func Click_1()
   Sleep (10000)
   MouseClick("left" , 863, 356) ;Click the X button
   sleep (250)
   MouseClick("left" , 1300, 186) ;Click the X button
   sleep (250)
   MouseClick("left" , 1260, 200) ;Click Amount TextBox
   sleep (250)
   for $x - 1 to 8
      send ("{BACKSPACE down}")
      sleep (100)
      Send("{BACKSPACE up}")
      sleep (100)
   Next ;Clicks Backspace 3 times
   sleep (100)
   Send("1.16") ;Inputs '1' into the amount box
   sleep (250)
   MouseClick("left" , 1245, 512) ;Click Call
   sleep (250)
   MouseClick("Left" , 790, 400)
   sleep (90000)
   MouseClick("right" , 807, 439)
   MouseClick("left" , 860, 665)
   sleep (5000)
   MouseClick("left" , 1001, 296)
   MouseClick("left" , 1012, 309)
   MouseClick("left" , 1046, 351)
   MouseClick("left" , 1046, 351)
EndFunc

Func Click_2()
   Sleep (1000)
   MouseClick("left" , 863, 563) ;Click the X button
   sleep (250)
   MouseClick("left" , 1260, 200) ;Click Amount TextBox
   sleep (250)
   for $x - 1 to 8
      send ("{BACKSPACE down}")
      sleep (100)
      Send("{BACKSPACE up}")
      sleep (100)
   Next ;Clicks Backspace 3 times
   sleep (100)
   Send("3.74") ;Inputs '1' into the amount box
   sleep (250)
   MouseClick("left" , 1245, 512) ;Click Call
   sleep (250)
   MouseClick("Left" , 790, 400)
   sleep (90000)
   MouseClick("right" , 807, 439)
   MouseClick("left" , 860, 665)
   sleep (5000)
   MouseClick("left" , 1001, 296)
   MouseClick("left" , 1012, 309)
   MouseClick("left" , 1046, 351)
   MouseClick("left" , 1046, 351)
EndFunc

This is the mainbot.au3 page

#include <MsgBoxConstants.au3>
#include <Functions2.au3>


HotKeySet("{F6}", "_Terminate")
Local $Data, $NewData;variable placeholder for selected text

Click_1()

While 1; make a loop to keep the script running inefinately
    WinActive("Functions2");You will probably want to use this to make the screen with the text the active window
    Send("^c");Send Ctrl + C to copy the copied text
    sleep(250);I add this to give the computer time to copy the data to the clipboard. It may not be necessary
    $NewData = ClipGet();This will read the clipboard data in windows and set it to the variable $data for comparisons
    If $NewData == 2.18 Then
       Click_1()
        $Data = $NewData
    EndIF
    IF $NewData == 0.00 Then
       Click_2()
        $Data == $NewData
    EndIF
    Sleep(1000);pause the program for 1 second so it doesn't overuse your processor.
WEnd

 

Edited by Estimize

Share this post


Link to post
Share on other sites

Can you copy and paste your code in a code window (its the <> symbols) rather than a blurry screen shot? Thy this. you can use msgbox to debug what is happening in your code to find out why it does not do what you want it to.

#include <MsgBoxConstants.au3>
HotKeySet("{F6}","Terminalte")

Local $Data = 2.18;stored value of what the selected text was as of the last check
Local $NewData;most current value of what is the selected text

Click_1();Run the function Click_1() when the script starts before the while loop

While 1; make a loop to keep the script running inefinately
    If WinExists("Function2") Then
        WinActive("Functions2");You will probably want to use this to make the screen with the text the active window
        Sleep(250)
    Else
        MgBox(0,"Missing Window","Functions2 window is not running")
        Exit 0
    EndIf
    Send("^c");Send Ctrl + C to copy the copied text
    sleep(250);I add this to give the computer time to copy the data to the clipboard. It may not be necessary
    $NewData = ClipGet();This will read the clipboard data in windows and set it to the variable $data for comparisons
    If $NewData == $Data Then;this value starts as 2.18 as declared by line 3
        Click_1()
        $Data = $NewData;Set $Data to 2.18 after Click_1() has been run
    EndIF
    If $NewData == 0.00 Then
        Click_2()
        $Data = $NewData;This will set $Data to 0.00
    EndIF
    If $NewData <> 2.18 and $NewData <> 0.00 Then
        MsgBox(0,"NewData Value not 2.18 or 0.00","The value of $NweData is neither 2.18 nor 0.00. The value of $NewData is: " & $NewData)
        Exit 0
    EndIf   
    Sleep(1000);pause the program for 1 second so it doesn't overuse your processor.
WEnd

Func Click1()
    MouseClick("",x1,y1)
EndFunc

Func Click_2()
    MouseClick("",x1,y1)
EndFunc

Func Terminate()
    Exit 0
EndFunc

 

what are the last 11 lines for???

 

 

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

#include <MsgBoxConstants.au3>
HotKeySet("{F6}","Terminate")

Local $Data = 2.18;stored value of what the selected text was as of the last check
Local $NewData;most current value of what is the selected text

Click_1();Run the function Click_1() when the script starts before the while loop

While 1; make a loop to keep the script running inefinately
    If WinExists("Function2") Then
        WinActive("Functions2");You will probably want to use this to make the screen with the text the active window
        Sleep(250)
    Else
        MgBox(0,"Missing Window","Functions2 window is not running")
        Exit 0
    EndIf
    Send("^c");Send Ctrl + C to copy the copied text
    sleep(250);I add this to give the computer time to copy the data to the clipboard. It may not be necessary
    $NewData = ClipGet();This will read the clipboard data in windows and set it to the variable $data for comparisons
    If $NewData == $Data Then;this value starts as 2.18 as declared by line 3
        Click_1()
        $Data = $NewData;Set $Data to 2.18 after Click_1() has been run
    EndIF
    If $NewData == 0.00 Then
        Click_2()
        $Data = $NewData;This will set $Data to 0.00
    EndIF
    If $NewData <> 2.18 and $NewData <> 0.00 Then
        MsgBox(0,"NewData Value not 2.18 or 0.00","$NewData is neither 2.18 nor 0.00. The value of $NewData is: " & $NewData)
        Exit 0
    EndIf   
    Sleep(1000);pause the program for 1 second so it doesn't overuse your processor.
WEnd

Func Click_1()
   Sleep (10000)
   MouseClick("left" , 863, 356) ;Click the X button
   sleep (250)
   MouseClick("left" , 1300, 186) ;Click the X button
   sleep (250)
   MouseClick("left" , 1260, 200) ;Click Amount TextBox
   sleep (250)
   for $x - 1 to 8
      send ("{BACKSPACE down}")
      sleep (100)
      Send("{BACKSPACE up}")
      sleep (100)
   Next ;Clicks Backspace 3 times
   sleep (100)
   Send("1.16") ;Inputs '1' into the amount box
   sleep (250)
   MouseClick("left" , 1245, 512) ;Click Call
   sleep (250)
   MouseClick("Left" , 790, 400)
   sleep (90000)
   MouseClick("right" , 807, 439)
   MouseClick("left" , 860, 665)
   sleep (5000)
   MouseClick("left" , 1001, 296)
   MouseClick("left" , 1012, 309)
   MouseClick("left" , 1046, 351)
   MouseClick("left" , 1046, 351)
EndFunc

Func Click_2()
   Sleep (1000)
   MouseClick("left" , 863, 563) ;Click the X button
   sleep (250)
   MouseClick("left" , 1260, 200) ;Click Amount TextBox
   sleep (250)
   for $x - 1 to 8
      send ("{BACKSPACE down}")
      sleep (100)
      Send("{BACKSPACE up}")
      sleep (100)
   Next ;Clicks Backspace 3 times
   sleep (100)
   Send("3.74") ;Inputs '1' into the amount box
   sleep (250)
   MouseClick("left" , 1245, 512) ;Click Call
   sleep (250)
   MouseClick("Left" , 790, 400)
   sleep (90000)
   MouseClick("right" , 807, 439)
   MouseClick("left" , 860, 665)
   sleep (5000)
   MouseClick("left" , 1001, 296)
   MouseClick("left" , 1012, 309)
   MouseClick("left" , 1046, 351)
   MouseClick("left" , 1046, 351)
EndFunc

Can you point them out for me? I am adding features to the code in the event that the selected text is neither 2.18 nor 0.00. Its optional and you can remove it if that will never happen.

Edited by computergroove

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

my code is now working and chooses call_1 or 2 appropriately and I renamed them to call because I felt it fitted it's purpose better. I used this

 

#include <MsgBoxConstants.au3>
#include <Functions2.au3>

HotKeySet("{F6}", "_Terminate")
Local $Data, $NewData;variable placeholder for selected text

Sleep (5000)

MouseClick ("right", 1260, 260)
Sleep (250)
MouseClick ("left", 1214, 485)
sleep (250)
Call_1()

While 1; make a loop to keep the script running inefinately
    WinActive("Functions2");You will probably want to use this to make the screen with the text the active window
    Send("^c");Send Ctrl + C to copy the copied text
    sleep(250);I add this to give the computer time to copy the data to the clipboard. It may not be necessary
    $NewData = ClipGet();This will read the clipboard data in windows and set it to the variable $data for comparisons
    If $NewData == 2.18 Then
       Call_1()
        ;$Data = $NewData
     Else
       $NewData == 0.00
       Call_2()
       ;$Data == $NewData
    EndIF
    Sleep(1000);pause the program for 1 second so it doesn't over use your processor.
WEnd

 

Now I need it to go onto call _3 if the result of the If statement call_2 is also 0.00 but if the result of the call_3 statement is 7.31 I need it to start back at call_1. If you don't understand I can explain it better because I'm sure I missed some sort of detail out, also thanks for the help so far very much appreciated. Also there can only be two values (like here 0.00 or 2.18) as what the program is asking a question and there are basically two answers every time it asks the question and one will always be 0.00. If the answer is 0.00 it will always go onto the next function for example if I was on call_2 and the answer was 0.00 I need the program to go onto call_3 but if the answer was 7.31 it goes back to call_1. Best explanation I can give. As well as this the program cannot skip call_1/2/3/4 to get to call_5 it has to go through all the call_'s in numerical order until the answer which isn't 0.00 is given then we loop back to call_1

 

 

Edited by Estimize
more info needed

Share this post


Link to post
Share on other sites

How many calls are there going to be? 5? What are the values that you want to call a click function on for these 5 calls? ie there will be click_1() = 2.18  click_2() = 0.00 click_3() =7.31 etc


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

there will be a max of 10 calls,  and you might have misunderstood, so the program executes call_1 then the result of call_1 which can either be 2.18 or 0.00 decides whether it will move onto call_2 or stay on call_1. the result of call_1 to move onto call_2 is 0.00 but if the result of call_1 is 2.18 then it just repeats call_1. So when it executes call_2 it gets a result back at the end of the function which is either 7.31 or 0.00 if the result is 0.00 it will move onto call_3 but if the result of call_2 was 7.31 then I need it to loop back to call_1 and repeat like that. the numbers are the least relevant bits I think. So if the result of call_1 and 2 and 3 was all 0.00 it moves onto call_4 and if the result of call_4 is  17.16 (that may change in future but it j=should be easily replaced) then the program loops back to call_1 and carries on from there, but if the result of call_4 is 0.00 then it needs to go onto call_5 and so on.

Share this post


Link to post
Share on other sites

You need a while loop where you have 10 + if statements or you need a do while loop or possibly several nested if statements. Really the point of this forum is to help you understand the concept of what you want your script to do and be able to write and modify your own. Are you stuck? Where are you stuck?


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

You need a while loop where you have 10 + if statements or you need a do while loop or possibly several nested if statements. Really the point of this forum is to help you understand the concept of what you want your script to do and be able to write and modify your own. Are you stuck? Where are you stuck?

The while loop is the bit of program I am stuck on.

 

 

Share this post


Link to post
Share on other sites

See if you can wrap your mind around this. It would help me write more if the info you gave me was correct and complete. What would help me the most would look something like this:

1. 0.00 or 2.18

2. 0.00 or 7.13

3. 0.00 or ?

4. 0.00 or 17.16

There's  a pattern here. Find it. Manipulate it to work for you.

#include <Array.au3>

Function_1();call the main function when the program starts

Func Function1()
    While 1; make a loop to keep the script running inefinately
        GetClipData();get the value of the number
        If $NewData == 2.18 Then
            Action_1()
        EndIf
        If
            $NewData == 0.00 Then
            Function_2()
        EndIF
        Sleep(1000);pause the program for 1 second so it doesn't over use your processor.
WEnd
EndFunc

Func Function_2()
    While 1; make a loop to keep the script running inefinately
        GetClipData();get the value of the number
        If $NewData == 7.13 Then
            Action_1()
            Function_1()
        EndIf
        If
            $NewData == 0.00 Then
            Action_3()
            Function_3()
        EndIF
        Sleep(1000);pause the program for 1 second so it doesn't over use your processor.
    WEnd
EndFunc

Func Function_3()
    While 1; make a loop to keep the script running inefinately
        GetClipData();get the value of the number
        If $NewData == 17.16 Then
            Action_1()
            Function_1()
        EndIf
        If
            $NewData == 0.00 Then
            Action_4()
            Function_4()
        EndIF
        Sleep(1000);pause the program for 1 second so it doesn't over use your processor.
    WEnd
EndFunc

Func GetClipData();get the number copied to the clipboard and then the value declared as a variable
    WinActive("Functions2");You will probably want to use this to make the screen with the text the active window
    Send("^c");Send Ctrl + C to copy the copied text
    sleep(250);I add this to give the computer time to copy the data to the clipboard. It may not be necessary
    $NewData = ClipGet();This will read the clipboard data in windows and set it to the variable $data for comparisons
EndFunc     

Func Action_1()
   Sleep (10000)
   MouseClick("left" , 863, 356) ;Click the X button
   sleep (250)
   MouseClick("left" , 1300, 186) ;Click the X button
   sleep (250)
   MouseClick("left" , 1260, 200) ;Click Amount TextBox
   sleep (250)
   for $x - 1 to 8
      send ("{BACKSPACE down}")
      sleep (100)
      Send("{BACKSPACE up}")
      sleep (100)
   Next ;Clicks Backspace 3 times
   sleep (100)
   Send("1.16") ;Inputs '1' into the amount box
   sleep (250)
   MouseClick("left" , 1245, 512) ;Click Call
   sleep (250)
   MouseClick("Left" , 790, 400)
   sleep (90000)
   MouseClick("right" , 807, 439)
   MouseClick("left" , 860, 665)
   sleep (5000)
   MouseClick("left" , 1001, 296)
   MouseClick("left" , 1012, 309)
   MouseClick("left" , 1046, 351)
   MouseClick("left" , 1046, 351)
EndFunc

Func Action_2()
   Sleep (1000)
   MouseClick("left" , 863, 563) ;Click the X button
   sleep (250)
   MouseClick("left" , 1260, 200) ;Click Amount TextBox
   sleep (250)
   for $x - 1 to 8
      send ("{BACKSPACE down}")
      sleep (100)
      Send("{BACKSPACE up}")
      sleep (100)
   Next ;Clicks Backspace 3 times
   sleep (100)
   Send("3.74") ;Inputs '1' into the amount box
   sleep (250)
   MouseClick("left" , 1245, 512) ;Click Call
   sleep (250)
   MouseClick("Left" , 790, 400)
   sleep (90000)
   MouseClick("right" , 807, 439)
   MouseClick("left" , 860, 665)
   sleep (5000)
   MouseClick("left" , 1001, 296)
   MouseClick("left" , 1012, 309)
   MouseClick("left" , 1046, 351)
   MouseClick("left" , 1046, 351)
EndFunc

 


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

Thanks so much, I'll try it out for a bit and then get back to you with my progress, really appreciated thanks.

Share this post


Link to post
Share on other sites

what is the action_1 etc meant to represent?

 

 

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

Function_1 searches for the number 0.00 and 2.18 then it calls the function action_1 or function_2. 

Object oriented design

1. Get the number.(call the function GetClipData())

2. If the number is 0.00 then Call function_2. If the number is 2.18 run action_1 again. (The if statements in Function_1())

3. In function_2, get the number. If the number is 0.00 then call function_3. If the number is 7.18 then call function_1 (start over).(The if statements in function_2())

etc.

Look at the function_# as the sequence you were describing for the numbers you want to compare. ie Function_1 compares 0.00 and 2.18. Function_2 compares 0.00 and 7.18. Function_3 I was given missing information from you so I dont know what the comparison is. You would make Function_4 to compare 0.00 and 17.16.

 

Edited by computergroove

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

I think I made a mistake in the code above.

Func Function_1();Only the first function needs to use a while loop.
    While 1; make a loop to keep the script running inefinately
        GetClipData();get the value of the number
        If $NewData == 2.18 Then
            Action_1()
        EndIf
        If
            $NewData == 0.00 Then
            Function_2()
        EndIF
        Sleep(1000);pause the program for 1 second so it doesn't over use your processor.
    WEnd
EndFunc

Func Function_2()
    ;you might want to put a sleep here depending on how long it takes for the value to change    
        GetClipData();get the value of the number
        If $NewData == 2.18 Then
            Action_1();your click sequence
            Function_1();restart back at the top (Function_1())
        EndIf
        If
            $NewData == 0.00 Then
            Action_2();Do something because the value is 0.00
            Function_2();Go on to the next function
        EndIF
        Sleep(1000);pause the program for 1 second so it doesn't over use your processor.
EndFunc

 

Edited by computergroove

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

Are we on track for nested IF statements?  I wonder what the source data represents? And the fact that it can always only be one item from a set of predefined values?  Do these values always increment? Can a value reduce? What are the implications if a wrong choice is made?

Intriguing.


Skysnake

Why is the snake in the sky?

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

  • Similar Content

    • vikashbitm2010
      By vikashbitm2010
      Hi all,
      I want to return string from autoit script to the python code.
      Autoit:
      Exit("22 FE 45") -> not working
      Exit(1) -> Working
      Exit(0) -> Working
      python:
      import os
      res=os.system(autoitmine.exe)
      print "res",res
      I got some hint of @ExitCode macro, but dont know how to use it to get the string in python variable 'res'.
      Please resolve this issue for me if anyone knows about this.
       
    • QuickWhiteWolf
      By QuickWhiteWolf
      Hi everyone,
       
      I was previously a member of this forum under the username Wombat. It's been years and multiple email accounts closed since then so I decided to start fresh and take a moment to thank you all... (Admins/Mods let me know if we need to discuss this...)
       
      I started programming with AutoIT while working as a scrap catcher for a machine that chopped scrap into pieces for easier moving, I learned styles and gained strengths from some of the best members on this forum by reverse engineering their code. I gained the confidence of our IT manager by making a boast that I could write an application to replace a p.o.s. cobalt based app we were using on the floor at that time, needless to say I was way in over my head but he saw that I had potential and I luckily had built several other apps on the side that were of equal or greater value to the company. I've been working as help-desk for the past 3 years and writing software as well to facilitate the help desk and solve recurring issues with our users. I was given an office and moved out of help-desk about a year ago, after 5 years of hard work I've actually landed the title of Jr. Developer moving into mid level title/pay this year! The company has already set out an improvement path that sees me with 4 certs and a bachelors in 4 more years making great money. Before this I had only ever worked at gas stations, fast food and manual labor jobs. If you're ever worried about your life, want something more, or just want a change you can do it. It's not easy, not at all, but it's possible and software programming is a very rewarding field if you like to make things and see how others interact with them.

      I utilized AutoIT to bring a company into the twenty-first century, away from paper trails and sticky notes improving the quality of life for the employees on the floor (where I started before learning AutoIT). I was given the go ahead to purchase visual studio and I learned VB.Net and built an awesome piece of Zebra labeling software (Utilizing ZPL code translated froma graphical editor) for our shipping department. Now I'm diving head first into C# and we have another programmer on board as we move on to MS Team Services and begin to tackle a sweet new project involving real time awareness of our product on the factory floor utilizing RFID and windows 10 tablets.

      That's a long way to come in just 4 years, and I couldn't have done it without the gigantic heart this community has and the mentorship provided for people looking to get into programming.

      So from the bottom of my heart, with immense respect.... Thank you so much AutoIT community
    • Valnurat
      By Valnurat
      Hi.
      How do you find all printers installed on a computer?
      I'm searching for the name, location and port
       
    • anub13
      By anub13
      Hi,

      I am having difficulties wondering why my code bugging like this,
      the symptom : I have a form with combo box, and details in bottom of the app, when user choose another option the details changes immediately but when I go to details, it goes up and down endlessly
      here is the code
       
      Global $cChkPatrol, $YES= "YES", $NO = "NO" if GUICtrlRead($combo1) = "YES" Then $cChkPatrol = $YES Else $cChkPatrol = $NO EndIf func StartForm() GUICtrlSetData($txtInfo,"ADDITIONAL INFORMATION THAT WILL BE SENT WITH THE MESSAGE:" & @CRLF & asdfgSystemInfo()) GUISetState(@SW_SHOW) AdlibRegister("_CheckPatrol") While 1 $nMsg = GUIGetMsg() Select case $nMsg = $txtEmailAddress GUICtrlSetData($txtInfo,"ADDITIONAL INFORMATION THAT WILL BE SENT WITH THE MESSAGE:" & @CRLF & asdfgSystemInfo()) case $nMsg = $txtPhone GUICtrlSetData($txtInfo,"ADDITIONAL INFORMATION THAT WILL BE SENT WITH THE MESSAGE:" & @CRLF & asdfgSystemInfo()) case $nMsg = $txtFullName GUICtrlSetData($txtInfo,"ADDITIONAL INFORMATION THAT WILL BE SENT WITH THE MESSAGE:" & @CRLF & asdfgSystemInfo()) case $nMsg = $cChkPatrol GUICtrlSetData($txtInfo,"ADDITIONAL INFORMATION THAT WILL BE SENT WITH THE MESSAGE:" & @CRLF & asdfgSystemInfo()) case $nMsg = $cmdScreenShot $gScreenShotFile = SaveScreenShot() case $nMsg = $cmdSubmit if ValidateForm() then if asdfgSubmit() Then UpdateStatus("Your request has been sent successfully") MsgBox(0,"Help Requested","Your request has been sent successfully") ExitLoop Else MsgBox(0,"Help Failed","Something is wrong you request was not sent, please try again") Endif endIf case $nMsg = $cmdAttach $gAttachFile = AttachFile() Case $nMsg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd AdlibUnRegister("_CheckPatrol") EndFunc func asdfgSystemInfo() dim $asdfgInfo $asdfgInfo = "" & @CRLF if $isAdminVersion=1 then $asdfgInfo = $asdfgInfo & @CRLF & " Ticket Tags:" & @CRLF $asdfgInfo = $asdfgInfo & "~#userphone='" & GUICtrlRead($txtPhone) & "'" & @CRLF $asdfgInfo = $asdfgInfo & "~#submitterphone='" & GUICtrlRead($txtPhone) & "'" & @CRLF dim $MachineID $MachineID = KaseyaIni($gKIniFile,"SERVER COMMUNICATIONS","User_Name","NotFound") $asdfgInfo = $asdfgInfo & "~#machineid='" & $MachineID & "'" & @CRLF dim $OrgGroups $OrgGroups= StringSplit($MachineID,".") dim $OrgGroupIndex $OrgGroupIndex = UBound($OrgGroups) - 1 $asdfgInfo = $asdfgInfo & "~#organization='" & $OrgGroups[$OrgGroupIndex] & "'" & @CRLF dim $EmailUser $EmailUser = GUICtrlRead($txtEmailAddress) $EmailUser = StringMid($EmailUser,1,StringInStr($EmailUser,"@") - 1) & @CRLF & @CRLF $asdfgInfo = $asdfgInfo & "~#username='" & $EmailUser & "'" & @CRLF ;dim ;Call("isChecked") ;$categ = GUICtrlRead($chkPatrol) ;$asdfgInfo = $asdfgInfo & "-#category='" & $categ & "'" & @CRLF EndIf $asdfgInfo = $asdfgInfo & "Email:" & GUICtrlRead($txtEmailAddress) & @CRLF & @CRLF $asdfgInfo = $asdfgInfo & "Full Name:" & GUICtrlRead($txtFullName) & @CRLF & @CRLF $asdfgInfo = $asdfgInfo & "Phone:" & GUICtrlRead($txtPhone) & @CRLF & @CRLF $asdfgInfo = $asdfgInfo & "DateTime:" & _Now() & @CRLF $asdfgInfo = $asdfgInfo & "MachineName:" & @ComputerName & @CRLF $asdfgInfo = $asdfgInfo & "UserName:" & @UserName & @CRLF $asdfgInfo = $asdfgInfo & "OS:" & @OSType & " " & @OSVersion & @CRLF $asdfgInfo = $asdfgInfo & "LogonDomain:" & @OSType & " " & @LogonDomain & @CRLF $asdfgInfo = $asdfgInfo & "LogonDNSDomain:" & @OSType & " " & @LogonDNSDomain & @CRLF $asdfgInfo = $asdfgInfo & "OS:" & @OSType & " " & @OSVersion & @CRLF $asdfgInfo = $asdfgInfo & "IP Address:" & @IPAddress1 & @CRLF $asdfgInfo = $asdfgInfo & "Public IP Address:" & GetPublicIP() &@CRLF ;$asdfgInfo = $asdfgInfo & "Public IP Address:" & _GetIP () &@CRLF $asdfgInfo = $asdfgInfo & "OS:" & NetAdapterInfo() $asdfgInfo = $asdfgInfo & "KaseyaInstalled:" & KaseyaInstalled() & @CRLF $asdfgInfo = $asdfgInfo & "KaseyaRunning:" & KaseyaRunning() & @CRLF $asdfgInfo = $asdfgInfo & "KaseyaAgentGUID:" & KaseyaIni($gKIniFile,"SERVER COMMUNICATIONS","Agent_Guid","NotFound") & @CRLF $asdfgInfo = $asdfgInfo & "asdfgPaid:" & isasdfgIDPaid() & @CRLF if $isAdminVersion=0 then $asdfgInfo = $asdfgInfo & @CRLF & " Ticket Tags:" & @CRLF $asdfgInfo = $asdfgInfo & "~userphone='" & GUICtrlRead($txtPhone) & "'" & @CRLF $asdfgInfo = $asdfgInfo & "~submitterphone='" & GUICtrlRead($txtPhone) & "'" & @CRLF dim $MachineID $MachineID = KaseyaIni($gKIniFile,"SERVER COMMUNICATIONS","User_Name","NotFound") $asdfgInfo = $asdfgInfo & "~machineid='" & $MachineID & "'" & @CRLF dim $OrgGroups $OrgGroups= StringSplit($MachineID,".") dim $OrgGroupIndex $OrgGroupIndex = UBound($OrgGroups) - 1 $asdfgInfo = $asdfgInfo & "~organization='" & $OrgGroups[$OrgGroupIndex] & "'" & @CRLF dim $EmailUser $EmailUser = GUICtrlRead($txtEmailAddress) $EmailUser = StringMid($EmailUser,1,StringInStr($EmailUser,"@") - 1) $asdfgInfo = $asdfgInfo & "~username='" & $EmailUser & "'" & @CRLF dim $categ $categ = $chkPatrol $asdfgInfo = $asdfgInfo & "~category='" & $categ & "'" & @CRLF dim $track $track = $cChkPatrol $asdfgInfo = $asdfgInfo & "~test='" & $cChkPatrol & "'" & @CRLF $asdfgInfo = $asdfgInfo & "~afterhour='" & $AfterHour & "'" & @CRLF endif Return $asdfgInfo endFunc  
      Yes it was same app as previous post in the forum I asked, I also having experience this happening before but I fail to understand the reason why this is happening. Thanks in advance.
      ButtonSupport - Copy.au3
    • Fhelipe
      By Fhelipe
      So I wanted to use my machine as a server for a program that had a unique login system. It can only log in 1 person and the password is in the script itself. I would like to adptar my code or change it completely so that I can create a database and the Script At Time Of Login Get Database Login And Log In
      Experience with Autoit: Basic                      (sorry for bad English)
      Experience with SQL: None                              (translator only)
      Code Currently Used To Login:
      ;=========================================================
      While 1
          $MSG = GUIGetMsg()
          Switch $MSG
          Case $ButtonOk
              If VerifyLogin(GUICtrlRead($USERNAME),GUICtrlRead($PASSWORD)) = 1 Then
                  GUIDelete($Form1)
                  MsgBox(-1,"Logado com Sucesso","Login Sucedido, Para Parar o Aimbot Pressione ESC!")
                  Run ("C:\Program Files (x86)\Steam\steamapps\common\Mitos.is The Game\Mitosis.exe")
                  RunP()
              Else
                  MsgBox(-1,"Error","Usúario ou Senha está incorreto, Ou Ainda Não Pagou!")
               EndIf
          Case -3
              Exit
           Case $ButtonCancel
              Exit
                Case $HelpButton
               MsgBox(-1, "Criadores", "Criadores: Zummey & Ralta")
      Case $Register
         MsgBox(-1, "ERRO", "PROGRAMA EM DESENVOLVIMENTO FUNÇÃO DESABILITADA")
          EndSwitch
      WEnd
      Func VerifyLogin($USERNAME,$PASSWORD)
          If $USERNAME = "Zummey" And $PASSWORD = "xd90fe10" Then
              Return 1
          Else
              Return 0
          EndIf
      EndFunc; End login
      ;=========================================================