Jump to content

Recommended Posts

Posted (edited)

I dont know i'm creating a GUI and when i run it, it takes like 4-5 seconds to exicute the buttons command... I dont understand i even place in some code that i know worked before. I was wondering if you guys had any ideas. heres the code, though i dont think anythings wrong with it.

GUICreate ( "Title" , 600, 330)         ; Create the GUI
GUISetBkColor ( 0x000000 )      ; Set the background to black

;-------------------------------------------------------------
;| Buttons                                                   |
;-------------------------------------------------------------
$extract = GUICtrlCreateButton ( "Extract All Images", 430,  10)
$close   = GUICtrlCreateButton ( "Close",              430, 265)
$hidden  = GUICtrlCreateButton ( "Hidden Mode",        100, 100)

;-------------------------------------------------------------
;| Images                                                    |
;-------------------------------------------------------------
$image = GUICtrlCreatePic ( "imageerror.jpg", 10, 10, 400, 300 )

GUISetState (@SW_SHOW) 


While 1
   Sleep(100)
   $msg = GUIGetMsg()
  
   If $msg = 0 Then Continueloop
   if $msg = -3 then Exit

    Select

        Case $msg = $extract

            msgbox( 0, "Error", "Doesn't Work Yet")

        Case $msg = $close
            
            exit
        
        Case $msg = $hidden
         
            exit
            
    EndSelect

WEnd
It happens both when its compiled and not compiled

Edited by DarkNecromancer
Posted

  DarkNecromancer said:

I dont know i'm creating a GUI and when i run it, it takes like 4-5 seconds to exicute the buttons command... I dont understand i even place in some code that i know worked before. I was wondering if you guys had any ideas. heres the code, though i dont think anythings wrong with it.

GUICreate ( "Title" , 600,

  Sleep(100)

[post="48800"]<{POST_SNAPBACK}>[/post]

Someone had the same problem earlier today. Jon told him to loose the Sleep. I think he built in a delay recently, or something like that. I just tried your script with and without the sleep, and without it the action is much faster.

Phillip

Posted

Couple of little changes. Try this. I removed the sleep, not required.

GUICreate ( "Title" , 600, 330)        ; Create the GUI
GUISetBkColor ( 0x000000 )     ; Set the background to black

;-------------------------------------------------------------
;| Buttons                                                   |
;-------------------------------------------------------------
$extract = GUICtrlCreateButton ( "Extract All Images", 430,  10)
$close   = GUICtrlCreateButton ( "Close",              430, 265)
$hidden  = GUICtrlCreateButton ( "Hidden Mode",        100, 100)

;-------------------------------------------------------------
;| Images                                                    |
;-------------------------------------------------------------
$image = GUICtrlCreatePic ( "imageerror.jpg", 10, 10, 400, 300 )

GUISetState (@SW_SHOW) 


While 1
  $msg = GUIGetMsg()

   Select
      
      Case $msg = -3
         
         Exit

      Case $msg = $extract

         msgbox( 0, "Error", "Doesn't Work Yet")

      Case $msg = $close
           
         exit
       
      Case $msg = $hidden
        
         exit
           
   EndSelect

WEnd

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...