RyGoTypE Posted May 12, 2005 Share Posted May 12, 2005 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. http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
scriptkitty Posted May 12, 2005 Share Posted May 12, 2005 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,cancelNext 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 More sharing options...
RyGoTypE Posted May 12, 2005 Author Share Posted May 12, 2005 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? http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
Blue_Drache Posted May 12, 2005 Share Posted May 12, 2005 (edited) 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 May 12, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 12, 2005 Author Share Posted May 12, 2005 Okay, I got all that done. Is there a command for new line? For example in php it is "/n" http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
Helge Posted May 13, 2005 Share Posted May 13, 2005 InputBox("Title","Line 1" & @CRLF & "Line 2") Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 13, 2005 Author Share Posted May 13, 2005 Thanks Helge. http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 13, 2005 Author Share Posted May 13, 2005 (edited) 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 May 13, 2005 by RyGoTypE http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
scriptkitty Posted May 13, 2005 Share Posted May 13, 2005 ; 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 More sharing options...
MarkMarkMark Posted May 13, 2005 Share Posted May 13, 2005 mmm why not do something like this: run("***Your Firefox path***\firefox.exe" & $url ) Link to comment Share on other sites More sharing options...
scriptkitty Posted May 13, 2005 Share Posted May 13, 2005 (edited) 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 May 13, 2005 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
MarkMarkMark Posted May 13, 2005 Share Posted May 13, 2005 Yeah, i see forgot it Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 14, 2005 Author Share Posted May 14, 2005 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? http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted May 14, 2005 Share Posted May 14, 2005 yes. You can also remove the path to firefox.exe and put 'start' instead. That will open the webpage in the default browser Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 19, 2005 Author Share Posted May 19, 2005 How do you make the script terminate when the user clicks the "X" or the "Cancel" button? http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
Blue_Drache Posted May 19, 2005 Share Posted May 19, 2005 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now