Jump to content

Autoit3-gui


Recommended Posts

I am trying to create a popup window with au3gui so I can popup a license agreement with a read-only scrollable box for text. I'm also going to put a Yes and No button on it for users to agree or disagree. I cant find much documentation on au3gui. Can this been done and has anyone done it before?

Thanks

Link to comment
Share on other sites

Here is a non GUI way of doing it :whistle:

You can put in about as much text as you like and in full HTML, it will scroll.

AutoItSetOption("TrayIconDebug", 1)       ;0=no info, 1=debug line info
AutoItSetOption("WinTitleMatchMode", 2);2 = Match any substring in the title
cleanup()

$line=InputBox("Question", "What Licence Agreement in popup?", "", "", -1, -1, 0, 0)

If StringLen($line)<1 Then $line=clipget()
$color="#00FF66"
FileWriteLine("no.htm","<title>Sorry</title>")
FileWriteLine("no.htm","<b>Sorry</b>")
FileWriteLine("yes.htm","<title>I Agree</title>")
FileWriteLine("yes.htm","<b>Starting</b>")
htmlshow($color,$line)
$x=1
WinWait("My AutoIt3 Status")
While $x=1
If winexists("Sorry") Then bad()
If winexists("I Agree") Then ExitLoop
If NOT winexists("My AutoIt3 Status") and NOT winexists("I Agree") Then bad()
Wend

cleanup()
MsgBox(1,"Thanks for agreeing","Starting instalation now")

Func htmlshow($color,$line)
AutoItSetOption("WinWaitDelay", 0)
$title="My AutoIt3 Status"
$file = "test.html"
FileDelete($file)
FileWriteLine($file, "<title>My AutoIt3 Status</title>")
FileWriteLine($file, "<body bgcolor="& $color &">" )
FileWriteLine($file, $line )
FileWriteLine($file, "<br><a href=no.htm>I do not agree</a><br><a href=yes.htm><b>I Agree</a>" & @LF)
Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE -k "& @ScriptDir &"\test.html","",@SW_HIDE)
WinWait ( $title, "") 
WinMove ( $title, "", 1, 1, 400, 400) 
WinShow ($title, "", @SW_RESTORE) 
EndFunc

Func bad()
    winclose("Sorry")
    cleanup()
    exit
EndFunc

Func cleanup()
    winclose("Sorry")
    winclose("I Agree")
    FileDelete("no.htm")
    FileDelete("yes.htm")
    FileDelete("test.html")
EndFunc

edit.. added some error code.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

I am trying to create a popup window with au3gui so I can popup a license agreement with a read-only scrollable box for text.  I'm also going to put a Yes and No button on it for users to agree or disagree.  I cant find much documentation on au3gui.  Can this been done and has anyone done it before?

Thanks

Another way than the Scriptkitty one is to use AU3GUIXP from Larry.

http://www.hiddensoft.com/fileman/users/Larry/

Next release will incorporate this GUI feature inside AutoIt3 itself. :whistle:

Link to comment
Share on other sites

What is the difference between AUI3GUI and AUI3GUIXP?

syntax for defining the object and the interaction with your script

AU3GUIXP can be more readable ???

that the one which is evolving I think

Link to comment
Share on other sites

This was the answer to the question about GUI differences.

syntax for defining the object and the interaction with your script

AU3GUIXP can be more readable ???

that the one which is evolving I think

No mention was made that the XP only runs on XP OS, so this means that it will run on Win9X systems also?

Hope this was helpful.............good luck, Bob

Link to comment
Share on other sites

This was the answer to the question about GUI differences.

No mention was made that the XP only runs on XP OS, so this means that it will run on Win9X systems also?

Ugh, Larry, please take the XP out of the name so I don't have to see this question again! XP does not ALWAYS mean Windows XP only!
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...