Jump to content

hight level user help me plz..


Recommended Posts

how to use it??

this souce..?

in GUI..

checked Radio.. to conected to function.. other a direction..

summary

----------------------------------------------------------------

checked = operated.. or not checked = not pause.. ok??

------------------------------------------------------------------

how to??

ps: i'm sorry not corrected-_-;;

i'm student english,, in seoul korea.. this right?? so didn't not well.. english..be understand,,plz..

HotkeySet("{HOME}", "start")
HotkeySet("{END}", "stop")

While 1
WEnd
;...................................
Func start()
    While 1
        send (1)
        sleep (1000)    
    WEnd
EndFunc
;...................................
Func stop()
    While 1
    
    WEnd
EndFunc
;....................................
;under is GUI... INTERFACE??
;....................................
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 327, 232, 187, 116)
$Radio1 = GUICtrlCreateRadio("Radio1", 56, 32, 113, 17)
$Radio2 = GUICtrlCreateRadio("Radio2", 56, 72, 113, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

    EndSwitch
WEnd
Edited by himlight
Link to comment
Share on other sites

how to use it??

this souce..?

in GUI..

checked Radio.. to conected to function.. other a direction..

summary

----------------------------------------------------------------

checked = operated.. or not checked = not pause.. ok??

------------------------------------------------------------------

how to??

ps: i'm sorry not corrected-_-;;

i'm student english,, in seoul korea.. this right?? so didn't not well.. english..be understand,,plz..

HotkeySet("{HOME}", "start")
HotkeySet("{END}", "stop")

While 1
WEnd
;...................................
Func start()
    While 1
        send (1)
        sleep (1000)    
    WEnd
EndFunc
;...................................
Func stop()
    While 1
    
    WEnd
EndFunc
;....................................
;under is GUI... INTERFACE??
;....................................
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Form2", 327, 232, 187, 116)
$Radio1 = GUICtrlCreateRadio("Radio1", 56, 32, 113, 17)
$Radio2 = GUICtrlCreateRadio("Radio2", 56, 72, 113, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

    EndSwitch
WEnd
No, the code for your GUI never gets executed because the script is trapped in the empty While/WEnd loop. Even when you hit one of the hot keys, it just gets trapped in another loop in either start() or stop().

Perhaps this will help:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Global $Form2, $Radio1, $Label1, $Label2, $Radio2, $nMsg
Global $f_Run = False, $iCnt1 = 0, $iCnt2 = 0

HotKeySet("{HOME}", "start")
HotKeySet("{END}", "stop")

;....................................
;under is GUI... INTERFACE??
;....................................
$Form2 = GUICreate("Form2", 300, 300)
$Radio1 = GUICtrlCreateRadio("Radio1", 20, 20, 260, 20)
$Label1 = GUICtrlCreateLabel("Counter One = " & $iCnt1, 20, 60, 260, 20)
$Radio2 = GUICtrlCreateRadio("Radio2", 20, 100, 260, 20)
$Label2 = GUICtrlCreateLabel("Counter Two = " & $iCnt2, 20, 140, 260, 20)
GUISetState(@SW_SHOW)

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

    If $f_Run Then
        If ControlCommand($Form2, "", $Radio1, "IsChecked") Then
            $iCnt1 += 1
            GUICtrlSetData($Label1, "Counter One = " & $iCnt1)
        EndIf

        If ControlCommand($Form2, "", $Radio2, "IsChecked") Then
            $iCnt2 += 1
            GUICtrlSetData($Label2, "Counter Two = " & $iCnt2)
        EndIf
    EndIf
WEnd

;...................................
Func start()
    $f_Run = True
EndFunc  ;==>start

;...................................
Func stop()
    $f_Run = False
EndFunc  ;==>stop

Notice that the main loop checks the status of $f_Run flag continuously, and the hot key functions only change the flag.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...