Sign in to follow this  
Followers 0
edena

Koda and Au3Rec

2 posts in this topic

Hi! I'm back again.

I was exploring Autoit and came up to produce a Au3Recorder script which is quoted below:

* How would you put a GUI button to control the following Au3Rec script produced below to open Google site inside a Firefox browser?

* How would you put a GUI button to control the following Au3Rec script below to open with Internet Explorer but this time Invisibly?

Please help.

#region --- Au3Recorder generated code Start ---

_WinWaitActivate("Mozilla Firefox","")

Send("http{SHIFTDOWN}?{SHIFTUP}??www?google?com{ENTER}")

")

#region --- Internal functions Au3Recorder Start ---

Func _WinWaitActivate($title,$text,$timeout=0)

WinWait($title,$text,$timeout)

If Not WinActive($title,$text) Then WinActivate($title,$text)

WinWaitActive($title,$text,$timeout)

EndFunc

#endregion --- Internal functions Au3Recorder End ---

#endregion --- Au3Recorder generated code End ---

#endregion --- Au3Recorder generated code End ---

Thank You.

Share this post


Link to post
Share on other sites



Is the above question difficult to produce?

Or is the Aut3Recorder just placed for decoration? (:) Please no offense just want to know how useful this particular tool is.

Okay this is my version of controlling the above script that I produced using a single button and take note I haven't tried it out yet, just used my imagination. lol!!! ;):

#include <ButtonConstants.au3>

#include <GUIConstantsEx.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

#include <IE.au3>

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Form1", 325, 121, 192, 114)

$Button1 = GUICtrlCreateButton("Open Google", 80, 56, 163, 41)

$Label1 = GUICtrlCreateLabel("The following button is an example to control a Au3Recorder", 8, 16, 305, 17)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Case $Button1

Run("my file name with a .exe extension") ;This is the .au3 file which has the Au3Recorder Script I produced earlier above that you will later convert to a .exe file

Exit

EndSwitch

WEnd

Please if any suggestions or corrections I'm really grateful to learn from you.

Thank You

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