Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

URL execute not working

Participant ,
Oct 28, 2015 Oct 28, 2015

Hi All,

this is my code:

var str="do shell script \"http://192.168.9.218/ags/indesignReturn.php?rtype=closeSignal&fileStatus=5&batchId=331320\"";

app.doScript(str, ScriptLanguage.APPLESCRIPT_LANGUAGE);

it is not executing what is the problem

Thanks in Advance,

Mahesh

TOPICS
Scripting
568
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Oct 28, 2015 Oct 28, 2015

Dirty solution ...

JS code

// URL escape & by \\

var myURL="http://192.168.9.218/ags/indesignReturn.php?rtype=closeSignal\\&fileStatus=5\\&batchId=331320";

// call a applescript

var mScript = "/Users/xxx/Desktop/openURL.scpt";

var mResult = app.doScript(mScript,ScriptLanguage.applescriptLanguage,[myURL]);

openURL.scp

set myURL to item 1 of arguments

try

    set openURL to do shell script "open " & myURL

on error errStr number errorNumber

    set openURL to false

end try

return openURL

Translate
Enthusiast ,
Oct 28, 2015 Oct 28, 2015

Hi,

Try this ...

var str='do shell script "open http://192.168.9.218/ags/indesignReturn.php?rtype=closeSignal&fileStatus=5&batchId=331320"';

app.doScript(str, ScriptLanguage.APPLESCRIPT_LANGUAGE);

Regards

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 28, 2015 Oct 28, 2015

Hi

Thanks for reply

i try your code it opens the browser, but the url not properly execute

"http://192.168.9.218/ags/indesignReturn.php?rtype=closeSignal"

this code only shows after the '&' symbol it is not copied in address bar

Mahesh

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 28, 2015 Oct 28, 2015
LATEST

Dirty solution ...

JS code

// URL escape & by \\

var myURL="http://192.168.9.218/ags/indesignReturn.php?rtype=closeSignal\\&fileStatus=5\\&batchId=331320";

// call a applescript

var mScript = "/Users/xxx/Desktop/openURL.scpt";

var mResult = app.doScript(mScript,ScriptLanguage.applescriptLanguage,[myURL]);

openURL.scp

set myURL to item 1 of arguments

try

    set openURL to do shell script "open " & myURL

on error errStr number errorNumber

    set openURL to false

end try

return openURL

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines