Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 04:02

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



AutoIt Problem

Discussion on AutoIt Problem within the AutoIt forum part of the Coders Den category.

Reply
 
Old 06/04/2010, 20:52   #16
 
elite*gold: 0
Join Date: Dec 2009
Posts: 705
Received Thanks: 312
Code:
Run("notepad.exe")
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


local $senden = false


$Form1 = GUICreate("", 503, 287, 192, 124)
 GUISetBkColor(0x00E0FFFF) ; Ändert die Hintergrundfarbe

$input =GUICtrlCreateInput("Hier dein Text rein ...", 32, 208, 425, 21)
$Start = GUICtrlCreateButton("Start", 40, 72, 137, 41, 0)
$Stop = GUICtrlCreateButton("Stop", 288, 72, 137, 41, 0)
GUISetState(@SW_SHOW)



While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Start
 $senden = true

        Case $Stop
            $senden = false
            
		EndSwitch
		
		
If $senden = true then ControlSend("[CLASS:Notepad]", "", "Edit1", GUICtrlRead($input))
	If $senden = true then ControlSend("[CLASS:Notepad]", "", "Edit1", "{enter}")
	
WEnd
v0lle is offline  
Thanks
2 Users
Old 06/04/2010, 21:32   #17
 
BestOfElite's Avatar
 
elite*gold: 33
Join Date: May 2010
Posts: 3,240
Received Thanks: 1,960
ja aber da kann man das interval nicht selber einstellen welche möglichkeiten gibts noch auser sleep??
BestOfElite is offline  
Old 06/04/2010, 21:39   #18
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
Welches Intervall?
Und warum willst du nciht mir Sleeps arbeiten?
Du kannst doch noch ne 2. Inputbox machen, in der man den Sleep, den man haben will, rienschreiben kann oO
Dann halt

$inputsleep =GUICtrlCreateInput("Sleep? ", X, X, X, X)
ControlSend("[CLASS:Notepad]", "", "Edit1", GUICtrlRead($input))
Sleep(GuiCtrlRead($inputsleep))
Σternαl. is offline  
Old 06/04/2010, 21:49   #19
 
elite*gold: 0
Join Date: Dec 2009
Posts: 705
Received Thanks: 312
genauso wird ichs auch machen oO
ich kenn ja nich ma dein problem^^
du hast ne lösung für an und aus
und was willst du noch?^^

mfg
v0lle is offline  
Thanks
1 User
Old 06/04/2010, 22:15   #20
 
BestOfElite's Avatar
 
elite*gold: 33
Join Date: May 2010
Posts: 3,240
Received Thanks: 1,960
Das mit dem on off ging auch vorher aber ih will ja das es auch off geht wenn ih ein Sleep Einbau weil das Problem ist wenn ich ein Input mit Sleep einbaue dann kann man den bot nicht mehr ausstellen das is ja meine Frage
BestOfElite is offline  
Old 06/04/2010, 22:54   #21
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
Was ist jetzt genau dein Problem und was willst du jetzt genau machen mit deinem Programm?
Also das Programm soll einen von dir angegebenen String an den Editor schicken.
Wo und warum genau willst du jetzt sleeps haben?
Soll dein string nur n-mal (irgend ne anzahl oft) geschickt werden oder permanent?
Σternαl. is offline  
Old 06/05/2010, 09:58   #22
 
BestOfElite's Avatar
 
elite*gold: 33
Join Date: May 2010
Posts: 3,240
Received Thanks: 1,960
Also nein es soll so lange schicken bis er off drückt und ih will ein Sleep weil man es einstellen können soll in wv sec der das schicken soll also wenn man 1000 eingibt dann 1 sek man muss das halt selber einstellen können
BestOfElite is offline  
Old 06/05/2010, 11:38   #23
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
Also wenn man 1000 eingibt, soll der den string nur jede Sekunde schicken?
Dann machs doch so, du hast ja ein Input, wo du den von dir gewollten Sleep einstellen kannst.

PHP Code:
#include <GUIConstants.au3>

Opt("GUIOnEventMode"1)

$button1 GUICtrlCreateButton(""XX,)
GUICtrlSetOnEvent(Default, "_send")
$button2 GUICtrlCreateButton(""XX)
GUICtrlSetOnEvent(Default, "_stop")
$input1 GUICtrlCreateInput(""XX)

GUISetState(@sw_show)

Global 
$check true

while 1
    
Do 
        
sleep(10)
    
Until GUIGetMsg() = $GUI_EVENT_CLOSE
    
Exit
wend

Func _stop
    $check 
false
EndFunc

Func _send
()
    
$check true
    
Do
        
ControlSend(""""X"")
        
Sleep(GUICtrlRead($input1))
    
Until $check false
EndFunc 
Oder

PHP Code:
#include <GUIConstants.au3>

Opt("GUIOnEventMode"1)

$button1 GUICtrlCreateButton(""XX,)
GUICtrlSetOnEvent(Default, "_send")
$button2 GUICtrlCreateButton(""XX)
GUICtrlSetOnEvent(Default, "_stop")
$input1 GUICtrlCreateInput(""XX)

GUISetState(@sw_show)

while 
1
    
Do 
        
sleep(10)
    
Until GUIGetMsg() = $GUI_EVENT_CLOSE
    
Exit
wend

Func _alr
()
    
AdlibRegister("_send"GUICtrlRead($input1))
EndFunc

Func _stop
    AdlibUnRegister
("_send")
EndFunc

Func _send
()
    
ControlSend(""""X"")
EndFunc 
Bin mir nich 100%ig sicher, obs klappt, aber versuchs mal.
Σternαl. is offline  
Thanks
1 User
Old 06/05/2010, 17:47   #24
 
BestOfElite's Avatar
 
elite*gold: 33
Join Date: May 2010
Posts: 3,240
Received Thanks: 1,960
Gleich mal probieren ^.^

ControlSend("", "", X, "") was muss da hin??
BestOfElite is offline  
Old 06/05/2010, 22:41   #25
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
War nur zu faul, um das alles einzutragen^^
Wenn du die 1. Klammer bei Controlsend neu schriebst, erscheint die AutoIt Hilfe.
Da stehen dann die Parameter, die du für die Funktion brauchst, durch Kommata getrennt.
Σternαl. is offline  
Reply




All times are GMT +1. The time now is 04:02.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.