Jump to content

@GUI_CtrlId


jdickens
 Share

Recommended Posts

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.

Link to comment
Share on other sites

  • Developers

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)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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