deef99 Posted June 29, 2009 Share Posted June 29, 2009 Yes...I am a newbie...and hoping this is not a stupid question.I need to create an exe that will do the following:1. Look at the first two characters of %v [parameter within a data string]. 2. If the two characters are "IB", then open an IE window [http:.....].3. Otherwise, stop.Seems easy enough. My problem seems to be with #1. How do I or what is the command I should be looking at to set this?Some background: We have a 400 seat call center and our phone agents work on different clients (IB is a client). The %v is a parameter that has data in it that is sent to our Phone Screen Pop app. It is a data string that contains something like: "IB 800-239-1212". So I need to open a different URL based on the client, or the first 2 characters. Right now, we simply have our Phone Screen Pop command as "http://dr.com\clientscript.aspx?vdn=%v" which, if the first 2 characters are NOT "IB", it opens a full size empty IE window that has to be shut manually by the agent. Yuck...just trying to improve that!Does that make any sense? I hope so...Any insight would be greatly appreciated! Link to comment Share on other sites More sharing options...
AoRaToS Posted June 29, 2009 Share Posted June 29, 2009 If StringRight("String or Variable", 2) = IB then ...do stuff EndIf s!mpL3 LAN Messenger Current version 2.9.9.1 [04/07/2019] s!mpL3 LAN Messenger.zip s!mpL3 Link to comment Share on other sites More sharing options...
Developers Jos Posted June 29, 2009 Developers Share Posted June 29, 2009 If StringRight("String or Variable", 2) = IB then ...do stuff EndIfGuess you mean: If StringLeft("String or Variable", 2) = "IB" then SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
AoRaToS Posted June 29, 2009 Share Posted June 29, 2009 Yes that's right! s!mpL3 LAN Messenger Current version 2.9.9.1 [04/07/2019] s!mpL3 LAN Messenger.zip s!mpL3 Link to comment Share on other sites More sharing options...
deef99 Posted June 29, 2009 Author Share Posted June 29, 2009 Wow...you guys are fast! That's fantastic! Regarding the passing of the info that is actually stored in %v... would I set that within the script or keep the parameter on the command line...or will this actually be based on how the Phone Screen Pop functions. How does the script know what is stored in %v? Sorry...probably another stupid question. I REALLY appreciate your insight. Link to comment Share on other sites More sharing options...
AoRaToS Posted June 29, 2009 Share Posted June 29, 2009 You'll have to read it into a variable which you'll then use the string function on where does that %v appear? is it a control?a label or something? s!mpL3 LAN Messenger Current version 2.9.9.1 [04/07/2019] s!mpL3 LAN Messenger.zip s!mpL3 Link to comment Share on other sites More sharing options...
deef99 Posted June 30, 2009 Author Share Posted June 30, 2009 You'll have to read it into a variable which you'll then use the string function onwhere does that %v appear?is it a control?a label or something?Please see my initial post...it is part of the command line...what command would I use to "read" it into a variable...and I will try it.THANKS AGAIN FOR YOUR KINK ASSISTANCE TO ME. Link to comment Share on other sites More sharing options...
ProgAndy Posted June 30, 2009 Share Posted June 30, 2009 Look at the $CMDLINE-Array (in the Helpfile) *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
deef99 Posted June 30, 2009 Author Share Posted June 30, 2009 Ok...here's what I've got so far. For testing, jusst trying to open Yahoo Home. Here is what I am executing: "i:\vb\vbtest.exe %v" OR "i:\vb\vbtest.exe" %v Both bring up the Message Box, not the IE site. The data stored in %v is IB 8002341234 Seems so simple...this is all so new to me...looking for help if possible...and thanks for getting me this far! dim $mvdn # $mvdn = $CMDLINE[1] If StringLeft($mvdn, 2) = "IB" Then _IECreate ("http://www.yahoo.com") Else MsgBox(0, "Not Finding IB", "Try Something else!") Exit EndIf Link to comment Share on other sites More sharing options...
NiVZ Posted June 30, 2009 Share Posted June 30, 2009 Hello, Slightly confused by how/where the value of %v is set? Is it a DOS environment variable? Can you go to a DOS prompt and type: echo %v If so, you need to look at the ENVGET function in the help. Sorry if I've got the wrong end of the stick. NiVZ Link to comment Share on other sites More sharing options...
deef99 Posted June 30, 2009 Author Share Posted June 30, 2009 OMG! I have a # at the statement to populate the variable...duh! I will pull that and retest... Link to comment Share on other sites More sharing options...
NiVZ Posted June 30, 2009 Share Posted June 30, 2009 LOL I spotted that, but assumed it was a typo when you posted the code and wasn't actually in your code NiVZOMG! I have a # at the statement to populate the variable...duh! I will pull that and retest... Link to comment Share on other sites More sharing options...
Exit Posted June 30, 2009 Share Posted June 30, 2009 #include <IE.au3> Opt("ExpandEnvStrings", 1) If StringLeft("%V%", 2) = "IB" Then _IECreate("http://www.yahoo.com") Else MsgBox(0, "Not Finding IB", "Try Something else!") EndIf App: Au3toCmd UDF: _SingleScript() 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