Jump to content

how to call a variable from a while loop ?


Go to solution Solved by water,

Recommended Posts

Don't understand your problem.

Can you please post the code and tell us what doesn't work?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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

$Form1 = GUICreate("Form1", 615, 437, 192, 124)
$PicTim = GUICtrlCreatePic("C:\Users\Alexander\Downloads\images (2).jpg", 24, 80, 89, 89)
$com = GUICtrlCreateCombo("", 10, 10, -1, 100)
Dim $nMsg = GUIGetMsg()
  GUICtrlSetState(-1, $GUI_HIDE) ; the label is in disable state

GUISetState(@SW_SHOW)

While 1

        if $nMsg = $GUI_EVENT_CLOSE Then Exit
        if $nMsg = $PicTim Then GUICtrlDelete($PicTim)

    WEnd

im trying to call the $nmsg in the while loop but it is not working

Edited by alexander95

Link to comment
Share on other sites

The GUIGetMsg function needs to be placed in the loop, so it can captures the messages. It's not an onevent function.

Please read the helpfile next time.

Br, FireFox.

Edited by FireFox
Link to comment
Share on other sites

  • Solution

Why do you want to "call" it from outside the loop.

Please have a look at the help file for function GUICreate. The example shows how to code a GUI.

Or have a look at the tutorials in the wiki.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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