Jump to content

Help & Ideas


Recommended Posts

Okay, so I have this project all lined up for this game that I play... A couple things came to mind.

1. Is it possible to make a splash screen in autoit with options to do something, if so how? (I.E. open script, asks if your internet connection is dial up or cable, when the user selects their speed, it loads the script according to their internet speed.)

2. Can a script be ran minimized, if so how?

If anyone is interested in helping me with this script, please let me know by either replying to this thread or PMing me.

Link to comment
Share on other sites

1. Is it possible to make a splash screen in autoit with options to do something, if so how? (I.E. open script, asks if your internet connection is dial up or cable, when the user selects their speed, it loads the script according to their internet speed.)

Yes, you can make a really nice one with the GUI built in to AutoIt, but it can be a bit intimidating to start. As your first bot, you might want to start it off with msgbox and InputBox. MsgBox is really easy and you can do a lot with it, or ask multiple questions acording to answers.

$q1=MsgBox(3,"Connection","Cable = yes" & @crlf & "Dialup=no" & @crlf & "Quit Script=Cancel"); returns 6,7, or 2 for yes,no,cancel

Next you could ask them to input speed in a input box if they chose dialup.

2. Can a script be ran minimized, if so how?

Scripts always run in the backround pretty much, but I think your question is can the script run programs that are minimized. In that case, the answer is yes, but with the disclaimer that only some functions work with minimised programs. YOu can't really go and click on somethng with the mouse that is not on the screen. Test out the control commands, they work great for mminimised programs for the most part.

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

Is there a way to open a text field, so to speak and have the window title say "Please enter your URL" and then they enter their URL and press an "Okay" button, and it changes the URL in the code automatically with out them having to edit any of the code?

<{POST_SNAPBACK}>

Assign the inputbox() command to a variable. Example:

$box = InputBox("Enter Something","Enter the URL")
MsgBox(0,"Display answer","You typed in: " & $box)

You could then call the variable later on in the program for whatever else you needed.

Keeping the value that the user typed in for either a different program or for different runs is a different kettle of fish. That is generally accomplished by the use of .ini files and having the script read/write the inputted values to it.

All in all, look up InputBox() MsgBox() IniWrite() IniRead()

For your splash screen? I'd probably use the GUI functions, but for a simple one, you can use the SplashTextOn() or the SplashImageOn() functions.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

So does anyone know how I could have the url that the user enters in the prompt box to use in the script?

In the start I have:

; Enter URL.
    $URL = InputBox("Viewer", "Please enter the URL you wish to visit."  & @CRLF & "Example:"  & @CRLF & "www.google.com", "", "", _
    450, 200)

Next I have:

; Go to requested URL.
    WinActivate ("Mozilla Firefox","")
    Sleep(250)
    Send("{F6}")
    Sleep(250)
    Send("www.google.com")
    Sleep(250)
    Send("{ENTER}")

How can I have it send the URL that the user enters?

Edited by RyGoTypE
Link to comment
Share on other sites

; Enter URL.
    $URL = InputBox("Viewer", "Please enter the URL you wish to visit."  & @CRLF & "Example:"  & @CRLF & "www.google.com", "", "", _
    450, 200)

; Go to requested URL.
    WinActivate ("Mozilla Firefox","")
    Sleep(250)
    Send("{F6}")
    Sleep(250)
    Send($URL)
    Sleep(250)
    Send("{ENTER}")

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

normally I do something like:

run('C:\Program Files\Mozilla Firefox\firefox.exe "' & $URL & '"' ); notice that there are ' and " to enclose the URL in "

oh yea, and make sure to keep the space after firefox.exe and your URL

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

normally I do something like:

run('C:\Program Files\Mozilla Firefox\firefox.exe "' & $URL & '"' ); notice that there are ' and " to enclose the URL in "

oh yea, and make sure to keep the space after firefox.exe and your URL

<{POST_SNAPBACK}>

So by doing that, it automatically goes to the URL the user has enterd in the input box, when it opens mozilla?
Link to comment
Share on other sites

How do you make the script terminate when the user clicks the "X" or the "Cancel" button?

<{POST_SNAPBACK}>

An AdLib function would fill that bill nicely if it's looking for the non-existance of a particular window.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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