Sign in to follow this  
Followers 0
shanet

GUIGetMsg() and icons

23 posts in this topic

Hi all,

I am trying to make a simple launcher. The script works, however once compiled, it looks for the closest icon in my case and triggers it constantly.

eg.

while 1
switch GUIGetMsg()
Case $image1
msgbox(0, "", "Image 1")
Case $image2
msgbox(0, "", "Image 2")
EndSwitch
WEnd

(Just imaging the icons are loaded)

I have not clicked the icons yet the script triggers the first case. This leads me to believe GUICtrlCreateIcon() and GUIGetMsg() are incompatible with each other. Can anyone confirm this?

If not, I am happy to provide the code for the project to make it work properly.

Thanks,

shanet


[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites



shanet,

GUICtrlCreateIcon and GUIGetMsg are completely compatible. :unsure:

Let us see the code which gives the problem - although I have a good idea what might be the cause. :>

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

sure thing :unsure:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=launcher.exe
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Comment=Server Launch Center for XAMPP
#AutoIt3Wrapper_Res_Description=Server Launch Center for XAMPP
#AutoIt3Wrapper_Res_Fileversion=0.1.0.0
#AutoIt3Wrapper_Res_LegalCopyright=Shane Thompson 2011
#AutoIt3Wrapper_Run_AU3Check=n
#AutoIt3Wrapper_Tidy_Stop_OnError=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Run_Debug_Mode = n
Opt("MustDeclareVars", 1)

Global $sec = @SEC
Global $hGUI = GUICreate("Server Launch Center", 280, 200)
Global $headText = GUICtrlCreateLabel("Server Launch Center", 0, 12, 280, 30, "0x01")
GUICtrlSetFont($headText, 14, 650, 0, "Arial", 5)
Global $hXAMPPIco = GUICtrlCreatePic("xampp.ico", "XAMPP Control Panel", 25, 50)
GUICtrlCreateLabel("XAMPP Control Panel", 70, 50)
Global $hXAMPPText = GUICtrlCreateLabel("Not Running", 70, 67, 100, 14, "0x01")
Global $hThunderBirdIco = GUICtrlCreateIcon("thunderbird.ico", "Thunderbird Messaging Client", 25, 100)
GUICtrlCreateLabel("Thunderbird", 70, 100, 100, 15, "0x01")
Global $hThunderBirdText = GUICtrlCreateLabel("Not Running", 70, 117, 100, 14, "0x01")
Global $hNotepadPPIco = GUICtrlCreateIcon("notepadpp.ico", "Notepad++", 25, 150)
GUICtrlCreateLabel("Notepad++", 70, 150, 100, 15, "0x01")
Global $hNotepadPPText = GUICtrlCreateLabel("Not Running", 70, 167, 100, 14, "0x01")
Global $hDocumentRoot = GUICtrlCreateButton("Open htDocs", 193, 50, 80)
Global $hExitBtn = GUICtrlCreateButton("Exit", 193, 155, 80)
GUISetState()
_refresh()

While 1
    Switch GUIGetMsg()
        Case -3
            GUISetState(@SW_HIDE)
            Exit
        Case $hExitBtn
            Exit
        Case $hDocumentRoot
            Run("explorer.exe " & @WorkingDir & "xampp\htdocs", @WorkingDir & "\xampp\htdocs")
            if (@error <> 0) Then
                MsgBox(0, "ERROR", "Can not open htdocs." & @CRLF & "Please ensure the directory is correct.")
            EndIf
        Case $hXAMPPIco
            
            if (Run("./xampp/xampp-control.exe", "./xampp/") = 0) Then
                MsgBox(0, "XAMPP Control Panel", "ERROR: Could not run XAMPP Control Panel." & @CRLF & "Please check for the 'xampp' directory.");
            EndIf
        Case $hThunderBirdIco
            if(Run("./Thunderbird/ThunderbirdPortable.exe", "./Thunderbird/") = 0) Then
                MsgBox(0, "ThunderBird Messaging Client", "ERROR: Could not run Thunderbird." & @CRLF & "Please check for the 'Thunderbird' directory.");
            EndIf
        Case $hNotepadPPIco
            if (Run("./Notepad/Notepad++Portable.exe", "./Notepad/") = 0) Then
                MsgBox(0, "Notepad++", "ERROR: Could not run Notepad++." & @CRLF & "Please check for the 'Notepad++' directory.");
            EndIf
    EndSwitch

    Switch @SEC
        Case $sec > 54
            if (@SEC = ($sec - 58)) Then
                _refresh()
                $sec = @SEC
            EndIf
        Case $sec < 54
            if (@SEC = ($sec + 2)) Then
                _refresh()
                $sec = @SEC
            EndIf
    EndSwitch
WEnd

Func _refresh()
    ;XAMPP
    if (ProcessExists("xampp-control.exe")) Then
        GUICtrlSetBkColor($hXAMPPText, 0xaaffaa)
        GUICtrlSetData($hXAMPPText, "Running")
    Else
        GUICtrlSetBkColor($hXAMPPText, 0xff6666)
        GUICtrlSetData($hXAMPPText, "Not Running")

    EndIf
    ;ThunderBird
    if (ProcessExists("ThunderbirdPortable.exe")) Then
        GUICtrlSetBkColor($hThunderBirdText, 0xaaffaa)
        GUICtrlSetData($hThunderBirdText, "Running")
    Else
        GUICtrlSetBkColor($hThunderBirdText, 0xff6666)
        GUICtrlSetData($hThunderBirdText, "Not Running")

    EndIf
    ;Notepad++
    if (ProcessExists("Notepad++Portable.exe")) Then
        GUICtrlSetBkColor($hNotepadPPText, 0xaaffaa)
        GUICtrlSetData($hNotepadPPText, "Running")
    Else
        GUICtrlSetBkColor($hNotepadPPText, 0xff6666)
        GUICtrlSetData($hNotepadPPText, "Not Running")

    EndIf
EndFunc   ;==>_refresh

[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

shanet,

I think my guess was correct. :unsure:

Usually you get this "spontaneous" firing with GUIGetMsg when one of the controls has not been created and the variable used to store the ControlID is set to 0. And what do you get when GUIGetMsg has nothing to get? :>

You guessed it - 0! :)

Now let us look at your Icon control creation code:

Global $hXAMPPIco = GUICtrlCreatePic("xampp.ico", "XAMPP Control Panel", 25, 50)
Global $hNotepadPPIco = GUICtrlCreateIcon("notepadpp.ico", "Notepad++", 25, 150)
Global $hNotepadPPIco = GUICtrlCreateIcon("notepadpp.ico", "Notepad++", 25, 150)

Notice anything unusual about the first line? :D

Given that the syntax is incorrect for a Pic control, you will get a return value of 0 and the scenario I explained above means you will fire on that value 0 in $hXAMPPIco when GUIGetMsg returns an idle value of 0.

So change that line to create an Icon control and all should work as you wish. ;)

All clear? ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Melba23,

Sorry, that was me trying to 'fix' my code. I changed it back to Icon however it had absolutely no effect.


[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

shanet,

Add some errorchecking to see what you get as values for the icon controls like this:

Global $hXAMPPIco = GUICtrlCreatePic("xampp.ico", "XAMPP Control Panel", 25, 50)
ConsoleWrite("$hXAMPPIco = " & $hXAMPPIco & @CRLF)
Global $hThunderBirdIco = GUICtrlCreateIcon("thunderbird.ico", "Thunderbird Messaging Client", 25, 100)
ConsoleWrite("$hThunderBirdIco = " & $hThunderBirdIco & @CRLF)
Global $hNotepadPPIco = GUICtrlCreateIcon("notepadpp.ico", "Notepad++", 25, 150)
ConsoleWrite("$hNotepadPPIco = " & $hNotepadPPIco & @CRLF)

and see what you get. If the GUIGetMsg loop is spontaneously firing then one of them is almost certainly 0 - probably because the filename or iconName parameter is incorrect. :unsure:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

$hXAMPPIco = 4

$hThunderBirdIco = 7

$hNotepadPPIco = 10


[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

shanet,

I get the same values when I run your code with my own icons. :unsure:

When I run your script with my icons it works perfectly - and yet you say that the GUIGetMsg loop fires spontaneously. Does it always fire on the same icon/ControlID? Or does it vary? :>

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

It varies - If I comment out the case statement for $hXAMPPIco completely, it continues to fire the next case. And that is what led me to the conclusion that they must not be compatible with each other :S


[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

It might help if you compile this script and get it running to see the effect of the triggering, however have something ready to close your script super quick. I didnt and my computer completely froze up. I had to restart it in short. Anyway, compile this script as xampp-control.exe and put it in the directory ./xampp/

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=xampp-control.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
$hGUI = guiCreate("XAMPP SIM", 100, 100)
GUISetState($hGUI, @SW_SHOW)

While 1
    if GUIGetMsg() = -3 Then
        Exit
    EndIf
WEnd

Just a program with the process name xampp-control.exe to trick the script into looping.

Again, have something to close my program ASAP.

I created a simple batch file to do this.

:a

taskkill /im launcher.exe

goto a

where launcher.exe is the compiled name of the script.

Edited by shanet

[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

#11 ·  Posted

shanet,

Firing the first available case in the Switch structure is the classic sign of the 0 value in the ControlID - which is why I went down that route. :unsure:

Let us look at what you get from GUIGetMsg - try something like this and see what you get:

While 1
    $iMsg = GUIGetMsg()
    Switch $iMsg
        Case -3
            GUISetState(@SW_HIDE)
            Exit
        Case $hExitBtn
            Exit
        Case $hDocumentRoot
            ConsoleWrite("$hDocumentRoot fired with " & $iMsg & @CRLF)
        Case $hXAMPPIco
            ConsoleWrite("$hXAMPPIco fired with " & $iMsg & @CRLF)
        Case $hThunderBirdIco
            ConsoleWrite("$hThunderBirdIco fired with " & $iMsg & @CRLF)
        Case $hNotepadPPIco
            ConsoleWrite("$hNotepadPPIco fired with " & $iMsg & @CRLF)
    EndSwitch

This will tell us what values are actually firing the Cases. :>

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#12 ·  Posted

Melba, I forgot to mention one thing...

It only triggers once compiled.

Sorry!


[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

#13 ·  Posted

shanet,

It only triggers once compiled

GUIGetMsg and Switch still work the same way. :>

Try this and see what you get:

While 1
    $iMsg = GUIGetMsg()
    Switch $iMsg
        Case -3
            GUISetState(@SW_HIDE)
            Exit
        Case $hExitBtn
            Exit
        Case $hDocumentRoot
            GUICtrlSetData($hDocumentRoot, $iMsg)
        Case $hXAMPPIco
            GUICtrlSetData($hXAMPPText, $iMsg)
        Case $hThunderBirdIco
            GUICtrlSetData($hThunderBirdText, $iMsg)
        Case $hNotepadPPIco
            GUICtrlSetData($hNotepadPPText, $iMsg)
    EndSwitch

It works perfectly for me when compiled - I get the correct ControlID displayed only when I click the icon. :unsure:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#14 ·  Posted

Thanks Melba23,

That worked, and everything is perfect :unsure:

Thanks again!

Shanet


[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

#15 ·  Posted

shanet,

So what changed to prevent the spontaneous firing of the Switch Case? :unsure:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

eem when you have a event on a pic... and the pic doesnt exists the program do that event always... this happend to me when i compile the program and the pics are not in the folder ehre the program look for... i don´t know if is this your problrem.. try to inlude the pictures or icons in the compilation use fileinstall() or inlclude it like resources

EDIT: silly me ... i don´t look the post above this... sorry you have solve the problem...

Edited by monoscout999

Share this post


Link to post
Share on other sites

#17 ·  Posted

Melba,

It just randomly started firing again - the compiled program!

It was working fine. Then, today I started it up and it started firing again.

:unsure:

Also, including it with #include just errored saying there was an unterminated string on line x (whichever line it happened to be).


[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

shanet,

As a temporary fix add another Case to the Switch structure: :D

While 1
    $iMsg = GUIGetMsg()
    Switch $iMsg
        Case 0
            ; Do nothing
        Case -3
            GUISetState(@SW_HIDE)
            Exit
        Case $hExitBtn
            Exit

Now you should not fire the icon as you will already have a 0 Case which fires first. However, you may find that one of the icons becomes unresponsive as its ControlID will now be 0 - if so then that is the culprit and you will need to work out why it has not got a ControlID. :unsure:

One thing to try might be to make sure that you do get a valid ControlID after each GUICtrlCreateIcon call - and then setting the value to a default if it is actually 0.

Let me know how you get on - I would like to get to the bottom of this. ;)

M23

Edit: And I do not understand the "including it with #include just errored" bit - what are you including in what? :>

Edited by Melba23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

3 post above... try that.... answer me

Share this post


Link to post
Share on other sites

monoscout999,

He already checked that the Pic controls were being created in post #7. :unsure:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0