Jump to content
Sign in to follow this  
jdickens

@GUI_CtrlId

Recommended Posts

jdickens

Code that used this macro worked fine.

Now I get in Scite:

H:\AutoIt Scripts\ScanReader Scripts\ScRdrGUI01.au3 (349) : ==> Unknown macro.:

Case @GUI_CtrlId = $UnitNumInput

Case ^ ERROR

I have:

#include <GuiConstants.au3>

What did I do?

J


If I am too verbose, just say so. You don't need to run on and on.

Share this post


Link to post
Share on other sites
Jos

Code that used this macro worked fine.

Now I get in Scite:

H:\AutoIt Scripts\ScanReader Scripts\ScRdrGUI01.au3 (349) : ==> Unknown macro.:

Case @GUI_CtrlId = $UnitNumInput

Case ^ ERROR

I have:

#include <GuiConstants.au3>

What did I do?

J

<{POST_SNAPBACK}>

Is this error from AU3Check or AutoIt3 ? (should be able to see this in the output pane)

Are you running Prod or Beta ? (F5 or Alt+F5)


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
jdickens

At runtime from AutoIt3.

AU3Check doesn't catch it.

Vs. 3.1.0.15

F5 runs prog from Scite.

J


If I am too verbose, just say so. You don't need to run on and on.

Share this post


Link to post
Share on other sites
Jos

At runtime from AutoIt3.

AU3Check doesn't catch it.

Vs. 3.1.0.15

F5 runs prog from Scite.

J

<{POST_SNAPBACK}>

EDIT: These Macros are only available after a GUI is created and you use an event handler....see example for GUICtrlSetOnEvent() Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
jdickens

So I have these snippets, shown in order:

$hThisWin = GUICreate($ThisWinTitle, 1024, 768, (@DesktopWidth - 1024) / 2, (@DesktopHeight - 768) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

Opt ("GUIOnEventMode", 1) ; Change to OnEvent mode

GUICtrlSetOnEvent($PartNumInput, "DirectInput")

;^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v

Func DirectInput()

$BypassEval = $TRUE

$CodeWasEntered = $TRUE

Select

;;CRASHES ON NEXT CASE

Case @GUI_CtrlId = $UnitNumInput

GUICtrlSetBkColor($UnitNumLabel, 0xff0000) ; red

Case @GUI_CtrlId = $PartNumInput

GUICtrlSetBkColor($PartNumLabel, 0xff0000) ; red

Case @GUI_CtrlId = $QuantityInput

GUICtrlSetBkColor($QuantityLabel, 0xff0000) ; red

Case @GUI_CtrlId = $EmployeeNumInput

GUICtrlSetBkColor($EmployeeNumLabel, 0xff0000) ; red

EndSelect

EndFunc ;==>DirectInput

;^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v

Now I can't recall if there were any changes around this part of the script. Darn.

I can provide whole script but thought this might show something.

J


If I am too verbose, just say so. You don't need to run on and on.

Share this post


Link to post
Share on other sites
Jos

So I have these snippets, shown in order:

$hThisWin = GUICreate($ThisWinTitle, 1024, 768, (@DesktopWidth - 1024) / 2, (@DesktopHeight - 768) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

Opt ("GUIOnEventMode", 1)  ; Change to OnEvent mode

GUICtrlSetOnEvent($PartNumInput, "DirectInput")

;^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v

Func DirectInput()

$BypassEval = $TRUE

$CodeWasEntered = $TRUE

Select

;;CRASHES ON NEXT CASE

  Case @GUI_CtrlId = $UnitNumInput

   GUICtrlSetBkColor($UnitNumLabel, 0xff0000)    ; red

  Case @GUI_CtrlId = $PartNumInput

   GUICtrlSetBkColor($PartNumLabel, 0xff0000)    ; red

  Case @GUI_CtrlId = $QuantityInput

   GUICtrlSetBkColor($QuantityLabel, 0xff0000)    ; red

  Case @GUI_CtrlId = $EmployeeNumInput

   GUICtrlSetBkColor($EmployeeNumLabel, 0xff0000)    ; red

EndSelect

EndFunc   ;==>DirectInput

;^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v

Now I can't recall if there were any changes around this part of the script.  Darn.

I can provide whole script but thought this might show something.

J

<{POST_SNAPBACK}>

Maybe you can make a shorter version of your script that has this error and PM/Mail that to me so i can have look and replicate the issue ? Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
jdickens

I apologize for kludgy code :">

Error happens when you make an entry in the smaller input fields and hit enter.

J


If I am too verbose, just say so. You don't need to run on and on.

Share this post


Link to post
Share on other sites
Jos

I apologize for kludgy code :">

Error happens when you make an entry in the smaller input fields and hit enter.

J

<{POST_SNAPBACK}>

Runs fine in both 3.1.1.0 and the latest BETA....

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
jdickens

Hmmmm...

(I reserve the right to edit this post later :whistle: )

J


If I am too verbose, just say so. You don't need to run on and on.

Share this post


Link to post
Share on other sites
Jos

Hmmmm...

(I reserve the right to edit this post later :dance: )

J

<{POST_SNAPBACK}>

As long as you tell "the truth, the whole truth and nothing but the truth...." :whistle:

Try installing the latest Production an BETA versions and you'll see it does...


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.