Jump to content
Sign in to follow this  
gcue

shellexecute URL

Recommended Posts

gcue

hello world!

I think this might be a quotes issue but not sure..

here is the URL i am trying to open

 

if i copy paste that into a browser it works

however if i shellexeute it i get an "unexpected character" error

these are the methods i've tried (neither work but they do produce a link that i can copy paste into a browser to work):

$incident = "REF000004136214"


$site = "https://office.remedy.com/arsys/forms/remedy-s/HPD%3AHelp+Desk/Best+Practice+View/?qual='1000000161'=""" & $incident & '"'
ShellExecute($site)


$site = "https://office.remedy.com/arsys/forms/remedy-s/HPD%3AHelp+Desk/Best+Practice+View/?qual='1000000161'="
$full_site = $site & '"' & $incident & '"'
ShellExecute($full_site)

thanks in advance!

 

Share this post


Link to post
Share on other sites
jdelaney

Few examples:

$string = "https://office.remedy.com/arsys/forms/remedy-s/HPD%3AHelp+Desk/Best+Practice+View/?qual='100011'=""REF000004136214"""
ConsoleWrite($string & @CRLF)

$var = "REF000004136214"
$string = "https://office.remedy.com/arsys/forms/remedy-s/HPD%3AHelp+Desk/Best+Practice+View/?qual='100011'=""" & $var & """"
ConsoleWrite($string & @CRLF)

$string = 'https://office.remedy.com/arsys/forms/remedy-s/HPD%3AHelp+Desk/Best+Practice+View/?qual=''100011''="REF000004136214"'
ConsoleWrite($string & @CRLF)

$var = "REF000004136214"
$string = 'https://office.remedy.com/arsys/forms/remedy-s/HPD%3AHelp+Desk/Best+Practice+View/?qual=''100011''="' & $var & '"'
ConsoleWrite($string & @CRLF)
Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
gcue

neither worked..

trying to figure out how to wrap the whole string in double quotes - maybe that will work

thansk for your help =)

Share this post


Link to post
Share on other sites
gcue

i agree - they look fine - but for some reason i get a missing character from the browser - yet when i copy paste the output into the same browser it works..

bleh

Share this post


Link to post
Share on other sites
BrewManNH

What browser, and what is the missing character?


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
gcue

chrome - doesnt say what missing character is

funny thing tho.. is i paste the same string output into Chrome and it works

so thats why i have no idea whats going on

Share this post


Link to post
Share on other sites
BrewManNH

Try replacing the %3A with a colon ":", perhaps it's getting misread. A simple stringreplace should do  it.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
gcue

sorry brew i mistyped.. i get an unexpected character error not missing error (at position 13)...

and making that change didnt work either.. still get same error

Edited by gcue

Share this post


Link to post
Share on other sites
gcue

it does... before i shellexecute the link, i copy to the clipboard

shellexecute occurs and it fails in chrome.  however, i open chrome and paste the link and it works.

the link redirects to a different link.  maybe its shellexecute and the way it opens in the browser - not so much a syntax thing?

Share this post


Link to post
Share on other sites
gcue

i figured it out!

so the link re-directs.. for some reason, when i shellexecute the link it redirects to a link that does not carry over the quotes around the incident.

the same link manually pasted into the same browser on the same pc works because the quotes are carried over (translated to %22)

so not sure what the problem is - i am not using the redirected link instead (which redirects a second time - i just had to catch it in the middle of the process)

thank you all for your help =)

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  

×