Jump to content
Sign in to follow this  
deef99

Passing % Parameter to Pop a Window

Recommended Posts

deef99

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!

Share this post


Link to post
Share on other sites
Jos

If StringRight("String or Variable", 2) = IB then

...do stuff

EndIf

Guess you mean:

If StringLeft("String or Variable", 2) = "IB" then

:)


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
deef99

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.

Share this post


Link to post
Share on other sites
AoRaToS

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.8.8 [30/09/2015]

Download Here

s!mpL3

Share this post


Link to post
Share on other sites
deef99

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?

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.

Share this post


Link to post
Share on other sites
ProgAndy

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

Share this post


Link to post
Share on other sites
deef99

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

Share this post


Link to post
Share on other sites
NiVZ

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

Share this post


Link to post
Share on other sites
deef99

OMG! I have a # at the statement to populate the variable...duh! I will pull that and retest...

Share this post


Link to post
Share on other sites
NiVZ

LOL I spotted that, but assumed it was a typo when you posted the code and wasn't actually in your code :)

NiVZ

OMG! I have a # at the statement to populate the variable...duh! I will pull that and retest...

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.