Help me in Start&Stop and time and Checkbox :D

05/01/2012 20:50 Fairy10#1
i make the Script need Work Stop and Time i know how make Start work!

Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;=================================================
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Test", 423, 210, 488, 330, 0)
GUISetBkColor(0x646464)
$1 = GUICtrlCreateCheckbox("1", 5, 48, 25, 17)
$Input1 = GUICtrlCreateInput("", 72, 48, 33, 17)
$Label2 = GUICtrlCreateLabel("Time", 32, 48, 27, 17)
$Label3 = GUICtrlCreateLabel("Sec", 112, 48, 23, 17)
$Button1 = GUICtrlCreateButton("Start", 0, 96, 27, 17)
$Button2 = GUICtrlCreateButton("Exit", 64, 96, 27, 17)
$Button3 = GUICtrlCreateButton("Stop", 32, 96, 27, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
	$msg = GUIGetMsg()
	
	Select

		Case $msg = $Button1
				
				$send1 = GUICtrlRead($1)
				
	
			While 1	
				Send($send1)
			
			WEnd
			
		Case $msg = $GUI_EVENT_CLOSE
			GUIDelete()
			ExitLoop
	
	EndSelect
		
WEnd
i went Stop and Time work Time when i write in (Input) 5 in Time 5 Sec write 1 all 5 sec or i write in (Input) 7 or 10 or other write 1 after 7 or 10 or other

and went when chick stop time and Write 1 Stop so all stop so can one help me ?

and Place no one say see here [Only registered and activated users can see links. Click Here To Register...] :D
05/02/2012 06:53 Achat#2
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]

Regards
05/02/2012 11:23 Fairy10#3
Quote:
Originally Posted by Achat View Post
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]

Regards
not work
05/02/2012 12:45 lolkop#4
use timerinit to save a timestamp to a variable, and timerdiff to calculate the current difference...
05/02/2012 14:44 Fairy10#5
Quote:
Originally Posted by Achat View Post
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]

Regards
Quote:
Originally Posted by lolkop View Post
use timerinit to save a timestamp to a variable, and timerdiff to calculate the current difference...
so my code now
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;=================================================
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Test", 423, 210, 488, 330, 0)
GUISetBkColor(0x646464)
$1 = GUICtrlCreateCheckbox("1", 5, 48, 25, 17)
$Input1 = GUICtrlCreateInput("", 72, 48, 33, 17)
$Label2 = GUICtrlCreateLabel("Time", 32, 48, 27, 17)
$Label3 = GUICtrlCreateLabel("Sec", 112, 48, 23, 17)
$Button1 = GUICtrlCreateButton("Start", 0, 96, 27, 17)
$Button2 = GUICtrlCreateButton("Exit", 64, 96, 27, 17)
$Button3 = GUICtrlCreateButton("Stop", 32, 96, 27, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
	$msg = GUIGetMsg()
	
	Select

		Case $msg = $Button1
				
				$send1 = GUICtrlRead($1)
				
	
			While 1	
				Send($send1)
			
			WEnd
			
		Case $msg = $GUI_EVENT_CLOSE
			GUIDelete()
			ExitLoop
	
 EndSelect
Local $begin = TimerInit()
Sleep(3000)
Local $dif = TimerDiff($begin)
MsgBox(0, "Time Difference", $dif)


WEnd
AdlibRegister("MyAdlib")
;...
Exit

Func MyAdlib()
    ;... execution must be non blocking, avoid ...Wait(), MsgBox(), InputBox() functions
    If WinActive("Error") Then
        ;...
    EndIf
EndFunc   ;==>MyAdlib
?
05/02/2012 14:57 lolkop#6
Quote:
Originally Posted by Fairy10 View Post
so my code now
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;=================================================
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Test", 423, 210, 488, 330, 0)
GUISetBkColor(0x646464)
$1 = GUICtrlCreateCheckbox("1", 5, 48, 25, 17)
$Input1 = GUICtrlCreateInput("", 72, 48, 33, 17)
$Label2 = GUICtrlCreateLabel("Time", 32, 48, 27, 17)
$Label3 = GUICtrlCreateLabel("Sec", 112, 48, 23, 17)
$Button1 = GUICtrlCreateButton("Start", 0, 96, 27, 17)
$Button2 = GUICtrlCreateButton("Exit", 64, 96, 27, 17)
$Button3 = GUICtrlCreateButton("Stop", 32, 96, 27, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
	$msg = GUIGetMsg()
	
	Select

		Case $msg = $Button1
				
				$send1 = GUICtrlRead($1)
				
	
			While 1	
				Send($send1)
			
			WEnd
			
		Case $msg = $GUI_EVENT_CLOSE
			GUIDelete()
			ExitLoop
	
 EndSelect
Local $begin = TimerInit()
Sleep(3000)
Local $dif = TimerDiff($begin)
MsgBox(0, "Time Difference", $dif)


WEnd
AdlibRegister("MyAdlib")
;...
Exit

Func MyAdlib()
    ;... execution must be non blocking, avoid ...Wait(), MsgBox(), InputBox() functions
    If WinActive("Error") Then
        ;...
    EndIf
EndFunc   ;==>MyAdlib
?
stop copy-pasting, and turn on your brain <.< local definitions in the global scope are totally useless...

for the beginning, try to work without guis.
05/02/2012 16:04 Fairy10#7
Quote:
Originally Posted by lolkop View Post
stop copy-pasting, and turn on your brain <.< local definitions in the global scope are totally useless...

for the beginning, try to work without guis.
how with out guis?
05/02/2012 16:07 Achat#8
Quote:
Originally Posted by Fairy10 View Post
how with out guis?
[Only registered and activated users can see links. Click Here To Register...]

If you are in SciTE, simply press F1 and it will explain anything ;)

Best Regards
05/02/2012 16:12 Fairy10#9
Quote:
Originally Posted by Achat View Post
[Only registered and activated users can see links. Click Here To Register...]

If you are in SciTE, simply press F1 and it will explain anything ;)

Best Regards
i know hotkeyset and know how make it work i will Try :)

but how i can make maximize minimize with hotkey?
05/02/2012 16:16 Achat#10
Quote:
Originally Posted by Achat View Post
[Only registered and activated users can see links. Click Here To Register...]

If you are in SciTE, simply press F1 and it will explain anything ;)

Best Regards
Quote:
Originally Posted by Fairy10 View Post
i know hotkeyset and know how make it work i will Try :)

but how i can make maximize minimize with hotkey?
Quote:
Originally Posted by Fairy10 View Post
how with out guis?
Minimize? Maximize? What?

Regards
05/02/2012 16:22 lolkop#11
Quote:
Originally Posted by Fairy10 View Post
i know hotkeyset and know how make it work i will Try :)

but how i can make maximize minimize with hotkey?
a simple guiless spammer could look like this:

Code:
While True
    Send(...)
WEnd
putting a delay into that script could give you this:
Code:
While True
    Send(...)
    Sleep(...)
WEnd
the next step would be, to replace the sleep command by timer commands. once you've understood the way, those timer operations work, you can start thinking about using a gui.
05/02/2012 17:07 osamaman2008#12
Quote:
Originally Posted by Achat View Post
Minimize? Maximize? What?

Regards
hid and show :D
05/02/2012 17:29 Achat#13
You didn't read the posts above, did you?

Code:
#NoTrayIcon ; This will "hide" your Script
Regards
05/02/2012 18:57 osamaman2008#14
Quote:
Originally Posted by Achat View Post
You didn't read the posts above, did you?

Code:
#NoTrayIcon ; This will "hide" your Script
Regards
sorry for i ask many
but thanks in any thing
if i make that what Func add to work ?
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Test", 256, 70, 299, 218)
$Button1 = GUICtrlCreateButton("Hid", 16, 8, 75, 25)
$Button2 = GUICtrlCreateButton("Show", 104, 8, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

	EndSwitch
WEnd
when i chick F1 dont find thing for that
05/02/2012 19:53 lolkop#15
Quote:
Originally Posted by osamaman2008 View Post
sorry for i ask many
but thanks in any thing
if i make that what Func add to work ?
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Test", 256, 70, 299, 218)
$Button1 = GUICtrlCreateButton("Hid", 16, 8, 75, 25)
$Button2 = GUICtrlCreateButton("Show", 104, 8, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

	EndSwitch
WEnd
when i chick F1 dont find thing for that
at this point, we've reached the limit of noobstuff <.<

if you wanna learn scripting, learn scripting and get rid of that koda generated or copy-pasted shit...

if we cut off the useless, parts of your script, we'll get this:
Code:
While 1
WEnd
this is the last time, i'm going to say this. if you're a beginner, do not start using any gui generator, and ask people in here how to add functionality.

Code:
functionality > design
thats the golden rule for all coders. a gui without any functionallity is totally useless... thats like the uber pc case, without any hardware inside...

if you're building a script, get the main part working first. once that's done you're allowed to design a user interface. do not even think about doing it in the other direction, and ask users in here to add the functionality for your designed gui!