Jump to content

Recommended Posts

Posted

Like I said in the description, the program pauses when I click on the file menu. Not a technical pause, like if I click "pause autoit script", but it lags up.

any ideas?

Posted

Like I said in the description, the program pauses when I click on the file menu. Not a technical pause, like if I click "pause autoit script", but it lags up.

any ideas?

Look, I think that the script already do that(check what happen when you press FILE menu):

$GUI = GUICreate("TEST")
$MENU = GUICtrlCreateMenu("FILE")
$ITEM1 = GUICtrlCreateMenuItem("OPEN",$MENU)
$ITEM2 = GUICtrlCreateMenuItem("SAVE",$MENU)
$ITEM3 = GUICtrlCreateMenuItem("CLOSE",$MENU)
$NUM_TEST = GUICtrlCreateInput("",200,200,50,20)
GUISetState()

$COUNT = 0

While 1
    If GUIGetMsg() = -3 Then Exit
    $COUNT += 1
    GUICtrlSetData($NUM_TEST,$COUNT)
    Sleep(20)
WEnd
Posted

Like I said in the description, the program pauses when I click on the file menu. Not a technical pause, like if I click "pause autoit script", but it lags up.

any ideas?

We need to see your code and understand the direction you want to go...

Before we can bring out the crystal ball!!

8)

NEWHeader1.png

Posted (edited)

Thanks Andreik, thanks exactly the problem.

My code is around 800 lines, so can we fix the code that he posted? If we find a solution to it then I'll be able to adapt it for my own script.

EDIT: The only difference is that mine is OnEventMode.

#include <GUIConstantsEx.au3>
$GUI = GUICreate("Test")
Opt("GUIOnEventMode", 1)
GUISetOnEvent($GUI_EVENT_CLOSE, "End")
$MENU = GUICtrlCreateMenu("File")
$ITEM1 = GUICtrlCreateMenuItem("OPEN",$MENU)
$ITEM2 = GUICtrlCreateMenuItem("SAVE",$MENU)
$ITEM3 = GUICtrlCreateMenuItem("CLOSE",$MENU)
$NUM_TEST = GUICtrlCreateInput("",200,200,50,20)
GUISetState()
$COUNT = 0
While 1
    $COUNT += 1
    GUICtrlSetData($NUM_TEST,$COUNT)
    Sleep(20)
WEnd
Func End()
    Exit
EndFunc
Edited by daslick
Posted

Thanks Andreik, thanks exactly the problem.

My code is around 800 lines, so can we fix the code that he posted? If we find a solution to it then I'll be able to adapt it for my own script.

EDIT: The only difference is that mine is OnEventMode.

#include <GUIConstantsEx.au3>
 $GUI = GUICreate("Test")
 Opt("GUIOnEventMode", 1)
 GUISetOnEvent($GUI_EVENT_CLOSE, "End")
 $MENU = GUICtrlCreateMenu("File")
 $ITEM1 = GUICtrlCreateMenuItem("OPEN",$MENU)
 $ITEM2 = GUICtrlCreateMenuItem("SAVE",$MENU)
 $ITEM3 = GUICtrlCreateMenuItem("CLOSE",$MENU)
 $NUM_TEST = GUICtrlCreateInput("",200,200,50,20)
 GUISetState()
 $COUNT = 0
 While 1
     $COUNT += 1
     GUICtrlSetData($NUM_TEST,$COUNT)
     Sleep(20)
 WEnd
 Func End()
     Exit
 EndFunc
Like this?

#include <GUIConstantsEx.au3>
#include <timers.au3>
$GUI = GUICreate("Test")
Opt("GUIOnEventMode", 1)
GUISetOnEvent($GUI_EVENT_CLOSE, "End")
$MENU = GUICtrlCreateMenu("File")
$ITEM1 = GUICtrlCreateMenuItem("OPEN",$MENU)
$ITEM2 = GUICtrlCreateMenuItem("SAVE",$MENU)
$ITEM3 = GUICtrlCreateMenuItem("CLOSE",$MENU)
$NUM_TEST = GUICtrlCreateInput("",200,200,50,20)
GUISetState()
$COUNT = 0
_Timer_SetTimer($gui,25,"countup")
While 1
    Sleep(20)
WEnd
Func End()
    Exit
EndFunc


Func CountUp($a,$b,$c,$d)
    $COUNT += 1
    GUICtrlSetData($NUM_TEST,$COUNT)
EndFunc
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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