Sign in to follow this  
Followers 0
Guest kotschi

Problem With Au3gui And Gui.action

3 posts in this topic

Does somebody know about the problem with the AU3GUI-Tool and the "GUI.action"="4"?

Here is my sample-code:

EnvSet("GUI.title","Radiobuttons")
EnvSet("GUI.focus","1")
EnvSet("GUI.action","4")
EnvSet("GUI.w","200")
EnvSet("GUI.h","100")

EnvSet("OBJ1.type","radio")
EnvSet("OBJ1.text","Button1")
EnvSet("OBJ1.x","10")
EnvSet("OBJ1.y","20")
EnvSet("OBJ1.w","100")
EnvSet("OBJ1.h","15")
EnvSet("OBJ1.selected","1")

EnvSet("OBJ2.type","radio")
EnvSet("OBJ2.text","Button2")
EnvSet("OBJ2.x","10")
EnvSet("OBJ2.y","40")
EnvSet("OBJ2.w","100")
EnvSet("OBJ2.h","15")

EnvSet("OBJ3.type","button")
EnvSet("OBJ3.text","&Next")
EnvSet("OBJ3.x","100")
EnvSet("OBJ3.y","60")
EnvSet("OBJ3.submit","1")
EnvSet("OBJ3.close","1")

RunWait("au3gui")
...

The problem is, that the tool doesn't set the data to the environment ("OBJ1","OBJ2",etc.)

Or can somebody explain me how the parameter '4' for the GUI.action works?

Thanks and regards

Share this post


Link to post
Share on other sites



Dunno why the env doesn't work... guess its lost after the au3gui ends.

To parse the info to your script you could use the below example...

EnvSet("GUI.title","Radiobuttons")
EnvSet("GUI.focus","1")
EnvSet("GUI.action","8")
EnvSet("GUI.w","200")
EnvSet("GUI.h","100")

EnvSet("OBJ1.type","radio")
EnvSet("OBJ1.text","Button1")
EnvSet("OBJ1.x","10")
EnvSet("OBJ1.y","20")
EnvSet("OBJ1.w","100")
EnvSet("OBJ1.h","15")
EnvSet("OBJ1.selected","1")

EnvSet("OBJ2.type","radio")
EnvSet("OBJ2.text","Button2")
EnvSet("OBJ2.x","10")
EnvSet("OBJ2.y","40")
EnvSet("OBJ2.w","100")
EnvSet("OBJ2.h","15")

EnvSet("OBJ3.type","button")
EnvSet("OBJ3.text","&Next")
EnvSet("OBJ3.x","100")
EnvSet("OBJ3.y","60")
EnvSet("OBJ3.submit","1")
EnvSet("OBJ3.close","1")

AutoItWinSetTitle("AU3GUI...")
RunWait("AU3GUI.exe")

$MyArray = ParseAU3GUI()
For $n = 1 to $MyArray[0]
   MsgBox(4096,$N,$MyArray[$n])
Next

; is from one of Larry's posts
Func ParseAU3GUI()
   $szBuffer = AutoItWinGetTitle()
   MsgBox(4096,"",$szBuffer)
   $aTemp = StringSplit($szBuffer,@LF & "=")
   $szBuffer = ""
   For $n = 3 to (UBound($aTemp)-1) Step 2
      $szBuffer = $szBuffer & $aTemp[$n] & @LF
   Next
   Return StringSplit(StringTrimRight($szBuffer,1),@LF)
EndFunc

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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks to you JdeB and Larry :whistle:

Edited by kotschi

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