Digi Posted November 1, 2006 Share Posted November 1, 2006 Hey there Guys and Girls... First off Mass respect for the Designers and Testers of AutoIt its a Absolutely Great program... Now for my problem...... Prob just me being dense again...lol I have a Script I have created to help out at work, what the script does basically is gets a Servername as a Input from the user and then connects to that server gets the main server on that blade and then connects to it to run part 2 of the script... Now on this point i need some assist, what i would like to do is this, if its possiable. The user enters Value say GatewayServer1 and not server1 is it possiable to have a process where it searches the input value and should the first few letters = Gateway or GW it will then Bypass my process of getting the main server name and just connect and run the main process? IE should $input contain GW* then run process CSDOWN, else run process Obtain server...... and i kinda need help on defining processes as well. lol...... im still a N00B at this programming stuffs. Saru Mo Ki Kara Ochiru[u]Direct Translation[/u]: Even monkeys will fall from trees.[u]I.E.:[/u] To Error is HumanMy Splash Screen applet: Splash Screen Coding Link to comment Share on other sites More sharing options...
Digi Posted November 1, 2006 Author Share Posted November 1, 2006 Found out how to do it... So thought ill post it for prosparity $servername = inputbox("Servername", "Please Enter Server name")$servername2 = stringleft($servername, 2)passwordloop() ;This is the Function Callup for Password Authenticationif $Rpasswd <> "pies" Then MSGbox(0, "Error", "Password incorrect Program Aborted") ExitElse If $servername2 <> "GW" Then Nogateway() Else gateway() EndIfEndIf---------------------------------You setup sub function by doing....Func *function name*() ;...EndFunc---------------------------------Just remember to declare your Variables as globals if you going to use them between functions....Just add them to the start of the fileDim @Rpasswd, $servername......... ETC... I know this basic for most but like me maybe there someone that can use the info Saru Mo Ki Kara Ochiru[u]Direct Translation[/u]: Even monkeys will fall from trees.[u]I.E.:[/u] To Error is HumanMy Splash Screen applet: Splash Screen Coding Link to comment Share on other sites More sharing options...
Valuater Posted November 1, 2006 Share Posted November 1, 2006 Welcome to the forums Digi Sorry no one answered your question... however It seems you have found your answer 8) Link to comment Share on other sites More sharing options...
Digi Posted November 2, 2006 Author Share Posted November 2, 2006 Welcome to the forums DigiSorry no one answered your question... howeverIt seems you have found your answer8)Thanks ValuaterNo biggy that i didnt get responce here, Peeps also busy with thier problems so i wasn't expecting the Fast reply or anything, i just happened to try something and it worked luckely, Dont worry Like i said, Im real new to this programming thing and still wanna get into it slowly, so learning as i try things... Saru Mo Ki Kara Ochiru[u]Direct Translation[/u]: Even monkeys will fall from trees.[u]I.E.:[/u] To Error is HumanMy Splash Screen applet: Splash Screen Coding 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