Jump to content

Recommended Posts

Posted

Hi everybody

i want to do a remnider. I use GUI but it doesnt works like i want.

I use edit box, combo with default preset time (1 min, 5 min...) and 2 buttons.

I want after i send enter on combobox, or click or enter on OK button close the Gui Msbbox and show it after selected time.

But it doesnt works. :whistle:

Help me pls.

THANKE YOU VERY MUCH

#include "C:\My documents\docs\AutoIt\Include\GUIConstants.au3"
AutoItSetOption ( "SendKeyDelay", 300 )

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000
GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$text = GuiCtrlCreateEdit("", 10, 10, 250, 70)
$Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110, 21)
$ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20)
$cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20)
GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1")

do

GuiSetState()

    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop

    Case $msg = $ok2
      $data = GUICtrlRead($Combo_4)

      sleep($data)

      if $data = 3 then
        MsgBox(0, "AutoIt", "3")
    endif

      if $data = 5 then
        MsgBox(0, "AutoIt", "5")
    endif 

     If $msg = 1 Then
     exit
    endif


$data = $data * 1000
sleep($data)
EndSelect

Until $msg = $GUI_EVENT_CLOSE or $msg = $cancel3
 
Exit
Posted

  danusko said:

Hi everybody

i want to do a remnider. I use GUI but it doesnt works like i want.

I use edit box, combo with default preset time (1 min, 5 min...) and 2 buttons.

I want after i send enter on combobox, or click or enter on OK button close the Gui Msbbox and show it after selected time.

But it doesnt works. :whistle:

Help me pls.

THANKE YOU VERY MUCH

#include "C:\My documents\docs\AutoIt\Include\GUIConstants.au3"
AutoItSetOption ( "SendKeyDelay", 300 )

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000
GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$text = GuiCtrlCreateEdit("", 10, 10, 250, 70)
$Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110, 21)
$ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20)
$cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20)
GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1")

do

GuiSetState()

    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop

    Case $msg = $ok2
      $data = GUICtrlRead($Combo_4)

      sleep($data)

      if $data = 3 then
        MsgBox(0, "AutoIt", "3")
    endif

      if $data = 5 then
        MsgBox(0, "AutoIt", "5")
    endif 

     If $msg = 1 Then
     exit
    endif
$data = $data * 1000
sleep($data)
EndSelect

Until $msg = $GUI_EVENT_CLOSE or $msg = $cancel3
 
Exit

<{POST_SNAPBACK}>

here you go man, had to make a few changes...

#include <GUIConstants.au3>
AutoItSetOption ( "SendKeyDelay", 300 )

;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000
GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$text = GuiCtrlCreateEdit("", 10, 10, 250, 70)
$Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110)
$ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20)
$cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20)
GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1")

while 1
    

GuiSetState()

    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
         ExitLoop

    Case $msg = $ok2
      $data = GUICtrlRead($Combo_4)
        MsgBox(0,"Sleep","sleeping for " & $data & " seconds.")
      sleep($data*1000)
        ToolTip("Sleep done")
    Case $msg = $Combo_4
      $data = GUICtrlRead($Combo_4)
        MsgBox(0,"Sleep","sleeping for " & $data & " seconds.")
      sleep($data*1000)
        MsgBox(0,"Sleep","sleep done")
    Case $msg = $cancel3
         ExitLoop
    EndSelect

WEnd

Exit
Posted

yes its good, but i want hide (close) msgbox and show it after selected time...and after then, anywhere i press enter or click on "OK" button

ps: messege box about time i forgot delet, its only for my info

is it so possible?

thanks

Posted

  danusko said:

yes its good, but i want hide (close) msgbox and show it after selected time...and after then, anywhere i press enter or click on "OK" button

ps: messege box about time i forgot delet, its only for my info

is it so possible?

thanks

<{POST_SNAPBACK}>

here ya go

#include <GUIConstants.au3>
AutoItSetOption ( "SendKeyDelay", 300 )

;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000
GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$text = GuiCtrlCreateEdit("", 10, 10, 250, 70)
$Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110)
$ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20)
$cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20)
GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1")

while 1
    

GuiSetState()

    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
         ExitLoop
        
    Case $msg = $ok2
      $data = GUICtrlRead($Combo_4)
        GUISetState(@SW_HIDE)
      sleep($data*1000)
        GUISetState(@SW_SHOW)
    Case $msg = $Combo_4
      $data = GUICtrlRead($Combo_4)
        GUISetState(@SW_HIDE)
      sleep($data*1000)
        GUISetState(@SW_SHOW)
    Case $msg = $cancel3
         ExitLoop
    EndSelect

WEnd

Exit
Posted

  cameronsdad said:

no problem.  glad i could help

<{POST_SNAPBACK}>

please one question yet,

how can i make that msgbox no hide when i click on concrete time on combo, but so as i choose the time and press enter .

simply at any moment when i press enter - the msgbox will by posted (hiden at selected time)

is this possible?

thanks

Posted

  danusko said:

please one question yet,

how can i make that msgbox no hide when i click on concrete time on combo, but so as i choose the time and press enter .

simply at any moment when i press enter - the msgbox will by posted (hiden at selected time)

is this possible?

thanks

<{POST_SNAPBACK}>

like this

#include <GUIConstants.au3>
AutoItSetOption ( "SendKeyDelay", 300 )

;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000
GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$text = GuiCtrlCreateEdit("", 10, 10, 250, 70)
$Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110)
$ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20)
$cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20)
GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1")

while 1
    

GuiSetState()

    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
         ExitLoop
        
    Case $msg = $ok2
      $data = GUICtrlRead($Combo_4)
        GUISetState(@SW_HIDE)
      sleep($data*1000)
        GUISetState(@SW_SHOW)
   ;Case $msg = $Combo_4
   ;  $data = GUICtrlRead($Combo_4)
   ;    GUISetState(@SW_HIDE)
   ;  sleep($data*1000)
   ;    GUISetState(@SW_SHOW)
    Case $msg = $cancel3
         ExitLoop
    EndSelect

WEnd

Exit

hope that helps

8)

NEWHeader1.png

Posted

#include <GUIConstants.au3>
AutoItSetOption ( "SendKeyDelay", 300 )

;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000
GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$text = GuiCtrlCreateEdit("", 10, 10, 250, 70)
$Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110)
$ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20)
$cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20)
GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1")

while 1
    

GuiSetState()

    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
         ExitLoop
        
    Case $msg = $ok2
      $data = GUICtrlRead($Combo_4)
        GUISetState(@SW_HIDE)
      sleep($data*1000)
        GUISetState(@SW_SHOW)
    Case $msg = $cancel3
         ExitLoop
    EndSelect

WEnd

Exit

Visit http://www.blizzedout.com/forums/register....referrerid=8306 for the top blizzard hacks. WoW, TfT, D2/LOD, CS. You name it we got it!

Posted

sorry but it still doesnt work,

is the same as before

i need this

i run script

write any text, press tab and default is there 1 minute.

when i want remind this text for a 1 minute a press only enter

and my cursor is on combobox no on "OK", or Cancel

this script doesnt make this or?

Posted

  danusko said:

sorry but it still doesnt work,

is the same as before

i need this

i run script

write any text, press tab and default is there 1 minute.

when i want remind this text for a 1 minute a press only enter

and my cursor is on combobox no on "OK", or Cancel

this script doesnt make this or?

<{POST_SNAPBACK}>

like this

#include <GUIConstants.au3>
AutoItSetOption ( "SendKeyDelay", 300 )

;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000
GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$text = GuiCtrlCreateEdit("", 10, 10, 250, 70)
$Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110)
$ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20)
GUICtrlSetState( -1, $GUI_DEFBUTTON)
$cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20)
GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1")

while 1
    

GuiSetState()

    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
         ExitLoop
        
    Case $msg = $ok2
      $data = GUICtrlRead($Combo_4)
        GUISetState(@SW_HIDE)
      sleep($data*1000)
        GUISetState(@SW_SHOW)
   ;Case $msg = $Combo_4
   ;  $data = GUICtrlRead($Combo_4)
   ;    GUISetState(@SW_HIDE)
   ;  sleep($data*1000)
   ;    GUISetState(@SW_SHOW)
    Case $msg = $cancel3
         ExitLoop
    EndSelect

WEnd

Exit

8)

NEWHeader1.png

Posted (edited)

#include <GUIConstants.au3>
AutoItSetOption ( "SendKeyDelay", 300 )

;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000
GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$text = GuiCtrlCreateEdit("", 10, 10, 250, 70)
$Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110)
$ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20,$BS_defpushbutton)
$cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20)
GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1")

while 1
    

GuiSetState()

    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
         ExitLoop
        
    Case $msg = $ok2
      $data = GUICtrlRead($Combo_4)
        GUISetState(@SW_HIDE)
      sleep($data*1000)
        GUISetState(@SW_SHOW)
    Case $msg = $cancel3
         ExitLoop
    EndSelect

WEnd

Exit

Edited by SupraNatural

Visit http://www.blizzedout.com/forums/register....referrerid=8306 for the top blizzard hacks. WoW, TfT, D2/LOD, CS. You name it we got it!

Posted (edited)

  SupraNatural said:

$ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20,[COLOR=red]$BS_defpushbutton[/COLOR])

<{POST_SNAPBACK}>

i got an error on yours

this "["

???

8)

OK..... i see your edit 8)

Edited by Valuater

NEWHeader1.png

Posted

  Valuater said:

i got an error on yours

this "["

???

8)

OK..... i see your edit 8)

<{POST_SNAPBACK}>

i dont understud

i have to put your script in my?

but when i insert this script

$ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20,[COLOR=red]$BS_defpushbutton[/COLOR])

makes me error

i have to delete "]"???

iam stupid :whistle:

Posted

  danusko said:

i dont understud

i have to put your script in my?

but when i insert this script

$ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20,[COLOR=red]$BS_defpushbutton[/COLOR])

makes me error

i have to delete "]"???

iam stupid :whistle:

<{POST_SNAPBACK}>

That message was for "SupraNatural" only.... not you

remove the line above

8)

NEWHeader1.png

Posted

  Valuater said:

That message was for "SupraNatural" only.... not you

remove the line above

8)

<{POST_SNAPBACK}>

ok

i removed it,

but valueter you know how i make what i want

when aj press enter on combo is the same as i click on "OK"

?

Posted

  danusko said:

ok

i removed it,

but valueter you know how i make what i want

when aj press enter on combo is the same as i click on "OK"

?

<{POST_SNAPBACK}>

yes

pressing enter actually presses the "ok" button, because it was set as the default button with this line

GUICtrlSetState( -1, $GUI_DEFBUTTON)

8)

NEWHeader1.png

Posted

  Valuater said:

yes

pressing enter actually presses the "ok" button, because it was set as the default button with this line

GUICtrlSetState( -1, $GUI_DEFBUTTON)

8)

<{POST_SNAPBACK}>

BUT IT DOESNT WORK AS I WONT

I WANT ONLY PRESS ENTER WHEN I AM ON COMBO....

NOW IT WORK ONLY, WHEN I WRITE TEXT, MOVE TO "ok" AND THEN, WHEN I PRES ENTER MSG BOX HIDE...

BUT I WANT MSG HIDE WHEN I PRESS ENTER ON COMBO

CAN I DO IT ANYTHING WITH THIS COMMAND?

$BS_DEFPUSHBUTTON

Posted

MY SCRIPT NOW:

#include <GUIConstants.au3>
AutoItSetOption ( "SendKeyDelay", 300 )

;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000
GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$text = GuiCtrlCreateEdit("", 10, 10, 250, 70)
$Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110)
$ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20)
$cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20)
GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1")

while 1
    

GuiSetState()

    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
         ExitLoop
        
    Case $msg = $ok2
      $data = GUICtrlRead($Combo_4)
        GUISetState(@SW_HIDE)
      sleep($data*1000)
TrayTip("", "cas " & $data, 5)
        GUISetState(@SW_SHOW)

    Case $msg = $cancel3
         ExitLoop

GUICtrlSetState( -1, $GUI_DEFBUTTON)
; $ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20,[COLOR=red]$BS_defpushbutton[/COLOR])

;   ;  GUICtrlCreateButton ( "text", left, top [, width [, height [, style [, exStyle]]]] )


    EndSelect

WEnd

Exit
Posted (edited)

just use this.... it works

#include <GUIConstants.au3>
AutoItSetOption ( "SendKeyDelay", 300 )

;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000
GuiCreate("MyGUI", 274, 120,(@DesktopWidth-274)/2, (@DesktopHeight-120)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$text = GuiCtrlCreateEdit("", 10, 10, 250, 70)
$Combo_4 = GuiCtrlCreateCombo("5", 10, 80, 110)
$ok2 = GuiCtrlCreateButton("OK", 130, 80, 50, 20)
GUICtrlSetState( -1, $GUI_DEFBUTTON)
$cancel3 = GuiCtrlCreateButton("Cancel", 190, 80, 50, 20)
GuiCtrlSetData($combo_4, "1|5|10|30|60|90|120", "1")

while 1
    

GuiSetState()

    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
         ExitLoop
        
    Case $msg = $ok2
      $data = GUICtrlRead($Combo_4)
        GUISetState(@SW_HIDE)
      sleep($data*1000)
        GUISetState(@SW_SHOW)
  ;Case $msg = $Combo_4
  ;  $data = GUICtrlRead($Combo_4)
  ;    GUISetState(@SW_HIDE)
  ;  sleep($data*1000)
  ;    GUISetState(@SW_SHOW)
    Case $msg = $cancel3
         ExitLoop
    EndSelect

WEnd

Exit

8)

Edited by Valuater

NEWHeader1.png

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
  • Recently Browsing   0 members

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