Sign in to follow this  
Followers 0
AceLoc

mm quick question :)

11 posts in this topic

Why dont this script send the 'controls' to that window ( when i use @SW_MINIMIZE ) and why DOES he sent the 'controls' when i use @SW_MAXIMIZE???

;-------------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1.0
; Author:        Jimmy
;
; Script Function:
;   Bootlegger Bot v1.495 Beta!
;
;-------------------------------------------------------------------------------

#Region --- CodeWizard generated code Start ---
;InputBox features: Title=Yes, Prompt=Yes, Default Text=No
If Not IsDeclared("sInputBoxAnswer") Then Dim $sInputBoxAnswer2
$sInputBoxAnswer2 = InputBox("Bootleggers bot :: v1.495 Beta","Welcome to Bootleggers bot :: v1.495 Beta " & @CRLF & "Created and designed by Jimmy... Have fun with it! :)" & @CRLF & @CRLF & "Please, fill in your accountname below!",""," ","-1","-1","-1","-1")
Select
   Case @Error = 0;OK - The string returned is valid

   Case @Error = 1;The Cancel button was pushed

   Case @Error = 3;The InputBox failed to open

EndSelect
#EndRegion --- CodeWizard generated code End ---
#Region --- CodeWizard generated code Start ---
;InputBox features: Title=Yes, Prompt=Yes, Default Text=No
If Not IsDeclared("sInputBoxAnswer") Then Dim $sInputBoxAnswer1
$sInputBoxAnswer1 = InputBox("Bootleggers bot :: v1.495 Beta","Welcome to Bootleggers bot :: v1.495 Beta " & @CRLF & "Created and designed by Jimmy... Have fun with it! :)" & @CRLF & @CRLF & "Please, fill in your password below!",""," ","-1","-1","-1","-1")
Select
   Case @Error = 0;OK - The string returned is valid

   Case @Error = 1;The Cancel button was pushed

   Case @Error = 3;The InputBox failed to open

EndSelect
#EndRegion --- CodeWizard generated code End ---
#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.6 Prototype

#include <GuiConstants.au3>

GuiCreate("Bootleggers bot :: v1.495 Beta!", 230, 130,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Label_1 = GuiCtrlCreateLabel("Account: " & $sInputBoxAnswer2, 10, 10, 180, 20)
$Label_2 = GuiCtrlCreateLabel("Password: " & $sInputBoxAnswer1, 10, 40, 180, 20)
$Label_3 = GuiCtrlCreateLabel("Is this correct?", 10, 70, 180, 20)
$Button_4 = GuiCtrlCreateButton("Yes!", 50, 100, 130, 23)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
            Case $msg = $Button_4
        If FileExists("C:\Program Files\Mozilla Firefox\firefox.exe") Then
;---------------------SCRIPT FOR BOT--------------------;
Run(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe", @ProgramFilesDir & "\Mozilla Firefox", @SW_MINIMIZE)
Sleep(5000)
$i = 0
Do

ControlSend("Mozilla Firefox Startpagina - Mozilla Firefox", "", "MozillaWindowClass6", "^l")
Sleep(1000)
ControlSend("Mozilla Firefox Startpagina - Mozilla Firefox", "", "MozillaWindowClass1", "http://www.bootleggers.us")
ControlSend("Mozilla Firefox Startpagina - Mozilla Firefox", "", "MozillaWindowClass1", "{ENTER}")
Sleep(2500)
ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", ""& $sInputBoxAnswer2);Accountname!
ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB}")
Sleep(250)
ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", ""& $sInputBoxAnswer1);Password!
ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB}")
ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", "{ENTER}")
;----------------------
sleep(2500)        
;----------------------
ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "^r")
Sleep(10000)
ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB 32}")
Sleep(500)
ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "{ENTER}")
Sleep(10000)
ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB 56}")
ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{SPACE}")
ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB}")
ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{ENTER}")
    $i = $i + 1
Until $i = 1
;------>END PART2<------;
$i = 0
Do
Sleep(125000)
ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass1", "^r")
ControlSend("Bevestigen", "", "MozillaWindowClass1", "{ENTER}")
    $i = $i + 1  
Until $i = 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999
;----------------------END SCRIPT----------------------;
Else
            MsgBox(64,"Sorry", "You need to download Mozilla Firefox first!", 3)
        EndIf
    Case Else
    ;;;
    EndSelect
WEnd
Exit
#endregion --- GuiBuilder generated code End ---

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites



Is it possible for you to try to do this in IE and use IE.au3? It would be much more stable, and I suspect the code would be much cleaner.

well.. actually idont care 'how clean' it is.

i only wanna know why this script dont work minimized. (it does minimize) but it wont sent the controls :/


[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites

when you run it, have you tried to step through it, to see where the failure is? To do this, you can use Opt("TrayIconDebug", 1), and see where the script hangs.

I'm trying to debug it, and it is a real mess :whistle:

From what I can see so far, I'm having a real hard time figuring out what you are trying to do. On your first controlsend, you are trying to send a ctrl + l or a ctrl + 1. Neither of those commands work in firefox.

Could you explain in simple terms what you are trying to do?

Share this post


Link to post
Share on other sites

Ok, I tried to clean it up, and it is better. I also fixed a few things. Try this, and see how this works.

;-------------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1.0
; Author:         Jimmy
;
; Script Function:
;    Bootlegger Bot v1.495 Beta!
;
;-------------------------------------------------------------------------------
#include <GuiConstants.au3>
Opt("WinTitleMatchMode", 2)
HotKeySet("{Esc}", "_exit")
;InputBox features: Title=Yes, Prompt=Yes, Default Text=No
If Not IsDeclared("sInputBoxAnswer") Then Dim $sInputBoxAnswer2
$sInputBoxAnswer2 = InputBox("Bootleggers bot :: v1.495 Beta", "Welcome to Bootleggers bot :: v1.495 Beta " & @CRLF & "Created and designed by Jimmy... Have fun with it! :)" & @CRLF & @CRLF & "Please, fill in your accountname below!", "", " ", "-1", "-1", "-1", "-1")
Select
    Case @error = 0;OK - The string returned is valid       
    Case @error = 1;The Cancel button was pushed        
    Case @error = 3;The InputBox failed to open
        
EndSelect

;InputBox features: Title=Yes, Prompt=Yes, Default Text=No
If Not IsDeclared("sInputBoxAnswer") Then Dim $sInputBoxAnswer1
$sInputBoxAnswer1 = InputBox("Bootleggers bot :: v1.495 Beta", "Welcome to Bootleggers bot :: v1.495 Beta " & @CRLF & "Created and designed by Jimmy... Have fun with it! :)" & @CRLF & @CRLF & "Please, fill in your password below!", "", " ", "-1", "-1", "-1", "-1")
Select
    Case @error = 0;OK - The string returned is valid       
    Case @error = 1;The Cancel button was pushed        
    Case @error = 3;The InputBox failed to open
        
EndSelect

$gui = GUICreate("Bootleggers bot :: v1.495 Beta!", 230, 130, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Label_1 = GUICtrlCreateLabel("Account: " & $sInputBoxAnswer2, 10, 10, 180, 20)
$Label_2 = GUICtrlCreateLabel("Password: " & $sInputBoxAnswer1, 10, 40, 180, 20)
$Label_3 = GUICtrlCreateLabel("Is this correct?", 10, 70, 180, 20)
$Button_4 = GUICtrlCreateButton("Yes!", 50, 100, 130, 23)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button_4
            GUIDelete($gui)
            If FileExists("C:\Program Files\Mozilla Firefox\firefox.exe") Then
                ;---------------------SCRIPT FOR BOT--------------------;
                Run(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe", @ProgramFilesDir & "\Mozilla Firefox") ;, @SW_MINIMIZE)
                winwaitactive("Mozilla Firefox", "",5)
                sleep(300)
                send("!f")
                sleep(20)
                send("l")
                ControlSend("Mozilla Firefox", "", "MozillaWindowClass1", "http://www.bootleggers.us")
                sleep(50)
                ControlSend("Mozilla Firefox", "", "MozillaWindowClass1", "{ENTER}")
                winwaitactive("Bootleggers :: v1.495 Beta", "",5)
                sleep(5000) ;no way to know if the page is loaded
                ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", "" & $sInputBoxAnswer2);Accountname!
                ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB}")
                ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", "" & $sInputBoxAnswer1);Password!
                ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB}")     
                ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", "{ENTER}")   
                sleep(2000)
                if WinExists("Confirm", "") then send("N")
                ;----------------------
                Sleep(2500)
                ;----------------------
                ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "^r")
                Sleep(10000)
                ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB 32}")
                Sleep(500)
                ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "{ENTER}")
                Sleep(10000)
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB 56}")
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{SPACE}")
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB}")
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{ENTER}")
                ;----------------------
                Sleep(2500)
                ;----------------------
                ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "^r")
                Sleep(10000)
                ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB 32}")
                Sleep(500)
                ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "{ENTER}")
                Sleep(10000)
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB 56}")
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{SPACE}")
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB}")
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{ENTER}")
                while 1
                    Sleep(125000)
                    ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass1", "^r")
                    ControlSend("Bevestigen", "", "MozillaWindowClass1", "{ENTER}")
                wend
            Else
                MsgBox(64, "Sorry", "You need to download Mozilla Firefox first!", 3)
            endif   
    endselect   
wend
func _exit()
    Exit
EndFunc

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Ok, I tried to clean it up, and it is better. I also fixed a few things. Try this, and see how this works.

;-------------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1.0
; Author:         Jimmy
;
; Script Function:
;    Bootlegger Bot v1.495 Beta!
;
;-------------------------------------------------------------------------------
#include <GuiConstants.au3>
Opt("WinTitleMatchMode", 2)
HotKeySet("{Esc}", "_exit")
;InputBox features: Title=Yes, Prompt=Yes, Default Text=No
If Not IsDeclared("sInputBoxAnswer") Then Dim $sInputBoxAnswer2
$sInputBoxAnswer2 = InputBox("Bootleggers bot :: v1.495 Beta", "Welcome to Bootleggers bot :: v1.495 Beta " & @CRLF & "Created and designed by Jimmy... Have fun with it! :)" & @CRLF & @CRLF & "Please, fill in your accountname below!", "", " ", "-1", "-1", "-1", "-1")
Select
    Case @error = 0;OK - The string returned is valid       
    Case @error = 1;The Cancel button was pushed        
    Case @error = 3;The InputBox failed to open
        
EndSelect

;InputBox features: Title=Yes, Prompt=Yes, Default Text=No
If Not IsDeclared("sInputBoxAnswer") Then Dim $sInputBoxAnswer1
$sInputBoxAnswer1 = InputBox("Bootleggers bot :: v1.495 Beta", "Welcome to Bootleggers bot :: v1.495 Beta " & @CRLF & "Created and designed by Jimmy... Have fun with it! :)" & @CRLF & @CRLF & "Please, fill in your password below!", "", " ", "-1", "-1", "-1", "-1")
Select
    Case @error = 0;OK - The string returned is valid       
    Case @error = 1;The Cancel button was pushed        
    Case @error = 3;The InputBox failed to open
        
EndSelect

$gui = GUICreate("Bootleggers bot :: v1.495 Beta!", 230, 130, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Label_1 = GUICtrlCreateLabel("Account: " & $sInputBoxAnswer2, 10, 10, 180, 20)
$Label_2 = GUICtrlCreateLabel("Password: " & $sInputBoxAnswer1, 10, 40, 180, 20)
$Label_3 = GUICtrlCreateLabel("Is this correct?", 10, 70, 180, 20)
$Button_4 = GUICtrlCreateButton("Yes!", 50, 100, 130, 23)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button_4
            GUIDelete($gui)
            If FileExists("C:\Program Files\Mozilla Firefox\firefox.exe") Then
                ;---------------------SCRIPT FOR BOT--------------------;
                Run(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe", @ProgramFilesDir & "\Mozilla Firefox") ;, @SW_MINIMIZE)
                winwaitactive("Mozilla Firefox", "",5)
                sleep(300)
                send("!f")
                sleep(20)
                send("l")
                ControlSend("Mozilla Firefox", "", "MozillaWindowClass1", "http://www.bootleggers.us")
                sleep(50)
                ControlSend("Mozilla Firefox", "", "MozillaWindowClass1", "{ENTER}")
                winwaitactive("Bootleggers :: v1.495 Beta", "",5)
                sleep(5000) ;no way to know if the page is loaded
                ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", "" & $sInputBoxAnswer2);Accountname!
                ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB}")
                ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", "" & $sInputBoxAnswer1);Password!
                ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB}")     
                ControlSend("Bootleggers :: v1.495 Beta - Mozilla Firefox", "", "MozillaWindowClass6", "{ENTER}")   
                sleep(2000)
                if WinExists("Confirm", "") then send("N")
                ;----------------------
                Sleep(2500)
                ;----------------------
                ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "^r")
                Sleep(10000)
                ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB 32}")
                Sleep(500)
                ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "{ENTER}")
                Sleep(10000)
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB 56}")
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{SPACE}")
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB}")
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{ENTER}")
                ;----------------------
                Sleep(2500)
                ;----------------------
                ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "^r")
                Sleep(10000)
                ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB 32}")
                Sleep(500)
                ControlSend("Bootleggers :: News - Mozilla Firefox", "", "MozillaWindowClass6", "{ENTER}")
                Sleep(10000)
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB 56}")
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{SPACE}")
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{TAB}")
                ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass6", "{ENTER}")
                while 1
                    Sleep(125000)
                    ControlSend("Bootleggers :: Crimes - Mozilla Firefox", "", "MozillaWindowClass1", "^r")
                    ControlSend("Bevestigen", "", "MozillaWindowClass1", "{ENTER}")
                wend
            Else
                MsgBox(64, "Sorry", "You need to download Mozilla Firefox first!", 3)
            endif   
    endselect   
wend
func _exit()
    Exit
EndFunc
and its still not running minimized.

this isnt coming further then my startpage.

and you use some Send("") cmds, and i want to run it minimized so i can do other things ( like MSN etc )

and btw CTRL + L is a hotkey to the adress bar :whistle:!

Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites

The problem is Firefox doesn't hanve control IDs to send to(That I can see). When I tested it, I couldn't get past the logon screen to test the code, (though it would get there and try to log in) and it would be better to do this in Internet Explorer. That way you could use the ie.aue functions to do what you want while minimized. (I think) I'm not that well versed in ie.au3. I used the send command instead of the control send at first, and got lazy in that I didn't change the other ones to send.

Try this:

;-------------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1.0
; Author:         Jimmy
;
; Script Function:
;    Bootlegger Bot v1.495 Beta!
;
;-------------------------------------------------------------------------------
#include <GuiConstants.au3>
Opt("WinTitleMatchMode", 2)
HotKeySet("{Esc}", "_exit")
;InputBox features: Title=Yes, Prompt=Yes, Default Text=No
If Not IsDeclared("sInputBoxAnswer") Then Dim $sInputBoxAnswer2
$sInputBoxAnswer2 = InputBox("Bootleggers bot :: v1.495 Beta", "Welcome to Bootleggers bot :: v1.495 Beta " & @CRLF & "Created and designed by Jimmy... Have fun with it! smile.gif" & @CRLF & @CRLF & "Please, fill in your accountname below!", "", " ", "-1", "-1", "-1", "-1")
Select
    Case @error = 0;OK - The string returned is valid      
    Case @error = 1;The Cancel button was pushed       
    Case @error = 3;The InputBox failed to open
       
EndSelect

;InputBox features: Title=Yes, Prompt=Yes, Default Text=No
If Not IsDeclared("sInputBoxAnswer") Then Dim $sInputBoxAnswer1
$sInputBoxAnswer1 = InputBox("Bootleggers bot :: v1.495 Beta", "Welcome to Bootleggers bot :: v1.495 Beta " & @CRLF & "Created and designed by Jimmy... Have fun with it! smile.gif" & @CRLF & @CRLF & "Please, fill in your password below!", "", " ", "-1", "-1", "-1", "-1")
Select
    Case @error = 0;OK - The string returned is valid      
    Case @error = 1;The Cancel button was pushed       
    Case @error = 3;The InputBox failed to open
       
EndSelect

$gui = GUICreate("Bootleggers bot :: v1.495 Beta!", 230, 130, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Label_1 = GUICtrlCreateLabel("Account: " & $sInputBoxAnswer2, 10, 10, 180, 20)
$Label_2 = GUICtrlCreateLabel("Password: " & $sInputBoxAnswer1, 10, 40, 180, 20)
$Label_3 = GUICtrlCreateLabel("Is this correct?", 10, 70, 180, 20)
$Button_4 = GUICtrlCreateButton("Yes!", 50, 100, 130, 23)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button_4
            GUIDelete($gui)
            If FileExists("C:\Program Files\Mozilla Firefox\firefox.exe") Then
                ;---------------------SCRIPT FOR BOT--------------------;
                Run(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe", @ProgramFilesDir & "\Mozilla Firefox") ;, @SW_MINIMIZE)
                winwaitactive("Mozilla Firefox", "",5)
                sleep(300)
                send("!f")
                sleep(20)
                send("l")
                Send("http://www.bootleggers.us")
                sleep(50)
                Send("{ENTER}")
                winwaitactive("Bootleggers :: v1.495 Beta", "",5)
                sleep(5000) ;no way to know if the page is loaded
                Send($sInputBoxAnswer2);Accountname!
                Send("{TAB}")
                Send($sInputBoxAnswer1)  ;Password!
                Send("{TAB}")  
                Send("{ENTER}")   
                sleep(2000)
                if WinExists("Confirm", "") then send("N")
                ;----------------------
                Sleep(2500)
                ;----------------------
                WinWaitActive("Bootleggers :: News - Mozilla Firefox", 30)
                sleep(500)
                Send("^r")
                Sleep(10000)
                Send("{TAB 32}")
                Sleep(500)
                Send("{ENTER}")
                Sleep(10000)
                Send("{TAB 56}")
                Send("{SPACE}")
                Send("{TAB}")
                Send("{ENTER}")
                ;----------------------
                Sleep(2500)
                ;----------------------
                Send("^r")
                Sleep(10000)
                Send("{TAB 32}")
                Sleep(500)
                Send("{ENTER}")
                WinWaitActive("Bootleggers :: Crimes - Mozilla Firefox", 30)
                Sleep(3000)
                Send("{TAB 56}")
                Send("{SPACE}")
                Send("{TAB}")
                Send("{ENTER}")
                while 1
                    Sleep(125000)
                    Send("^r")
                    sleep(50)
                    Send("{ENTER}")
                wend
            Else
                MsgBox(64, "Sorry", "You need to download Mozilla Firefox first!", 3)
            endif   
    endselect   
wend
func _exit()
    Exit
EndFunc

Share this post


Link to post
Share on other sites

The problem is Firefox doesn't hanve control IDs to send to(That I can see). When I tested it, I couldn't get past the logon screen to test the code, (though it would get there and try to log in) and it would be better to do this in Internet Explorer. That way you could use the ie.aue functions to do what you want while minimized. (I think) I'm not that well versed in ie.au3. I used the send command instead of the control send at first, and got lazy in that I didn't change the other ones to send.

Try this:

;-------------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1.0
; Author:         Jimmy
;
; Script Function:
;    Bootlegger Bot v1.495 Beta!
;
;-------------------------------------------------------------------------------
#include <GuiConstants.au3>
Opt("WinTitleMatchMode", 2)
HotKeySet("{Esc}", "_exit")
;InputBox features: Title=Yes, Prompt=Yes, Default Text=No
If Not IsDeclared("sInputBoxAnswer") Then Dim $sInputBoxAnswer2
$sInputBoxAnswer2 = InputBox("Bootleggers bot :: v1.495 Beta", "Welcome to Bootleggers bot :: v1.495 Beta " & @CRLF & "Created and designed by Jimmy... Have fun with it! smile.gif" & @CRLF & @CRLF & "Please, fill in your accountname below!", "", " ", "-1", "-1", "-1", "-1")
Select
    Case @error = 0;OK - The string returned is valid      
    Case @error = 1;The Cancel button was pushed       
    Case @error = 3;The InputBox failed to open
       
EndSelect

;InputBox features: Title=Yes, Prompt=Yes, Default Text=No
If Not IsDeclared("sInputBoxAnswer") Then Dim $sInputBoxAnswer1
$sInputBoxAnswer1 = InputBox("Bootleggers bot :: v1.495 Beta", "Welcome to Bootleggers bot :: v1.495 Beta " & @CRLF & "Created and designed by Jimmy... Have fun with it! smile.gif" & @CRLF & @CRLF & "Please, fill in your password below!", "", " ", "-1", "-1", "-1", "-1")
Select
    Case @error = 0;OK - The string returned is valid      
    Case @error = 1;The Cancel button was pushed       
    Case @error = 3;The InputBox failed to open
       
EndSelect

$gui = GUICreate("Bootleggers bot :: v1.495 Beta!", 230, 130, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Label_1 = GUICtrlCreateLabel("Account: " & $sInputBoxAnswer2, 10, 10, 180, 20)
$Label_2 = GUICtrlCreateLabel("Password: " & $sInputBoxAnswer1, 10, 40, 180, 20)
$Label_3 = GUICtrlCreateLabel("Is this correct?", 10, 70, 180, 20)
$Button_4 = GUICtrlCreateButton("Yes!", 50, 100, 130, 23)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button_4
            GUIDelete($gui)
            If FileExists("C:\Program Files\Mozilla Firefox\firefox.exe") Then
                ;---------------------SCRIPT FOR BOT--------------------;
                Run(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe", @ProgramFilesDir & "\Mozilla Firefox") ;, @SW_MINIMIZE)
                winwaitactive("Mozilla Firefox", "",5)
                sleep(300)
                send("!f")
                sleep(20)
                send("l")
                Send("http://www.bootleggers.us")
                sleep(50)
                Send("{ENTER}")
                winwaitactive("Bootleggers :: v1.495 Beta", "",5)
                sleep(5000) ;no way to know if the page is loaded
                Send($sInputBoxAnswer2);Accountname!
                Send("{TAB}")
                Send($sInputBoxAnswer1)  ;Password!
                Send("{TAB}")  
                Send("{ENTER}")   
                sleep(2000)
                if WinExists("Confirm", "") then send("N")
                ;----------------------
                Sleep(2500)
                ;----------------------
                WinWaitActive("Bootleggers :: News - Mozilla Firefox", 30)
                sleep(500)
                Send("^r")
                Sleep(10000)
                Send("{TAB 32}")
                Sleep(500)
                Send("{ENTER}")
                Sleep(10000)
                Send("{TAB 56}")
                Send("{SPACE}")
                Send("{TAB}")
                Send("{ENTER}")
                ;----------------------
                Sleep(2500)
                ;----------------------
                Send("^r")
                Sleep(10000)
                Send("{TAB 32}")
                Sleep(500)
                Send("{ENTER}")
                WinWaitActive("Bootleggers :: Crimes - Mozilla Firefox", 30)
                Sleep(3000)
                Send("{TAB 56}")
                Send("{SPACE}")
                Send("{TAB}")
                Send("{ENTER}")
                while 1
                    Sleep(125000)
                    Send("^r")
                    sleep(50)
                    Send("{ENTER}")
                wend
            Else
                MsgBox(64, "Sorry", "You need to download Mozilla Firefox first!", 3)
            endif   
    endselect   
wend
func _exit()
    Exit
EndFunc

heh IE sucks.

so well, toobad :/


[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites

sorry dude, its the only way I know around the problem. The code I gave you, what line does it get stuck?

no where, its just i cant run it minimized :whistle:


[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

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  
Followers 0