Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

simple question.... newby :) run web address


  • Please log in to reply
5 replies to this topic
wallyhenderson
  • Members
  • 4 posts
  • Last active: Feb 27 2015 01:34 AM
  • Joined: 19 Dec 2014
hi... im new... im making an script... dont know about programming so be kind with me :)
 
here is the problem...
 
this script works great (i do rearch for making it 2 hours :) so bad programming)
 
^!s::
https://www.google.com/search?q=%clipboard%
 
 
but here is the problem when i try to search on another website
 
 
^!s::
Run http://www.icd9data.com/Search/?q=%clipboard%#gsc.tab=0&gsc.q=%s&gsc.ref=more%3Aicd-9-cm_diagnosis_codes

 
if i use this line on google chrome search engines works fine
 
http://www.icd9data.com/Search/?q=%s#gsc.tab=0&gsc.q=%s&gsc.ref=more%3Aicd-9-cm_diagnosis_codes

think that replacing %s with %clipboard% would work but im stuck.... :(
 
can you help me?
 
thanx in advance


wallyhenderson
  • Members
  • 4 posts
  • Last active: Feb 27 2015 01:34 AM
  • Joined: 19 Dec 2014
hi... im new... im making an script... dont know about programming so be kind with me  :)
 
here is the problem...
 
this script works great (i do rearch for making it 2 hours  :) so bad programming)
 
^!s::
https://www.google.com/search?q=%clipboard%
 
 
but here is the problem when i try to search on another website
 
 
^!s::
Run http://www.icd9data.com/Search/?q=%clipboard%#gsc.tab=0&gsc.q=%s&gsc.ref=more%3Aicd-9-cm_diagnosis_codes
 
if i use this line on google chrome search engines works fine
 
http://www.icd9data.com/Search/?q=%s#gsc.tab=0&gsc.q=%s&gsc.ref=more%3Aicd-9-cm_diagnosis_codes
think that replacing %s with %clipboard% would work but im stuck....  :(
 
can you help me?
 
thanx in advance


Jackie Sztuk _Blackholyman
  • Spam Officer
  • 3757 posts
  • Last active: Apr 03 2016 08:47 PM
  • Joined: 28 Feb 2012

Its the extra % that giving you problems, but try this

url := "http://www.icd9data.com/Search/?q=%s#gsc.tab=0&gsc.q=%s&gsc.ref=more%3Aicd-9-cm_diagnosis_codes"
new_url := RegExReplace(url, "\%s", Clipboard)
run %new_url%

Helping%20you%20learn%20autohotkey.jpg?d

[AHK] Version. 1.1+ [CLOUD] DropBox ; Copy [WEBSITE] Blog ; About

space
  • Members
  • 520 posts
  • Last active:
  • Joined: 12 Aug 2014
%s occurs more than once so perhaps you need to replace it more than once as well. You may need to escape any further% characters http://ahkscript.org/docs/FAQ.htm#esc (the %3a) - and finally if there are spaces or newline characters in your clipboard you may need to replace those (replace space with a +) and use the Trim function to remove new lines and spaces http://ahkscript.org...mmands/Trim.htm - and if you haven't already, try to install the latest ahk from http://ahkscript.org/ for Trim to work if you need it.

wallyhenderson
  • Members
  • 4 posts
  • Last active: Feb 27 2015 01:34 AM
  • Joined: 19 Dec 2014

 

Its the extra % that giving you problems, but try this

url := "http://www.icd9data.com/Search/?q=%s#gsc.tab=0&gsc.q=%s&gsc.ref=more%3Aicd-9-cm_diagnosis_codes"
new_url := RegExReplace(url, "\%s", Clipboard)
run %new_url%

thanx will try



wallyhenderson
  • Members
  • 4 posts
  • Last active: Feb 27 2015 01:34 AM
  • Joined: 19 Dec 2014

 

Its the extra % that giving you problems, but try this

url := "http://www.icd9data.com/Search/?q=%s#gsc.tab=0&gsc.q=%s&gsc.ref=more%3Aicd-9-cm_diagnosis_codes"
new_url := RegExReplace(url, "\%s", Clipboard)
run %new_url%

thanx will try

 

%s occurs more than once so perhaps you need to replace it more than once as well. You may need to escape any further% characters http://ahkscript.org/docs/FAQ.htm#esc (the %3a) - and finally if there are spaces or newline characters in your clipboard you may need to replace those (replace space with a +) and use the Trim function to remove new lines and spaces http://ahkscript.org...mmands/Trim.htm - and if you haven't already, try to install the latest ahk from http://ahkscript.org/ for Trim to work if you need it.

ok will read that :)