Jump to content
dilligence

Would like a script for launching a website via symbolic link on my desktop

Recommended Posts

dilligence

Hello everyone,

I could use some help with the following: 
I'm a speech recognition user and recently I've started to use AutoIt for additional scripting because sometimes it works faster. 
I would like to create an AutoIt script that will open the Chrome link on my desktop which is a a symbolic link, so that the Chrome cache is on my Ram drive:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disk-cache-dir="A:\Browser Cache"

Next I want to send the website address, in this case: https://autochords.com/ (with SendKeys) to the address bar.
Then another SendKeys to send Enter.

I want to use this script when I'm working on my girlfriend's computer, where speech recognition isn't installed.

I could use ShellExecute ("Chrome", "https://autochords.com/") but then it won't run via my ram drive.

I am a Dragon NaturallySpeaking user. The program has a scripting language similar to VBA. In Dragon the command is as follows:

HeardWord "open","chrome" ; HeardWord acts as if I literally said "open Chrome" this command opens any desktop shortcut no matter which window I'm working in.
Wait 1500 
SendKeys "https://autochords.com/"
SendKeys "{Enter}"; these last three lines are similar to AutoIt language I think.....

Any help would be appreciated.

Rob


 

Share this post


Link to post
Share on other sites
Danp2

Use the Run command instead of ShellExecute. You can pass it the exact command you showed above.

There's also a Chrome UDF, which may be able to meet your needs.

Share this post


Link to post
Share on other sites
dilligence

Okay I will test that.

Edited by dilligence
Didn't test it properly

Share this post


Link to post
Share on other sites
dilligence

I got it to work, at least the launching of the Chrome Ink. The SendKeys part is not a problem I can insert that later.

Run(@ComSpec & ' /c "Chrome.lnk"', @DesktopDir, @SW_HIDE)

 

Edited by dilligence
Needed to test some more

Share this post


Link to post
Share on other sites
PACaleala

The next line will start Chrome from a link on the Win 10 desktop,

 go to the wanted web address ,

use the parameters needed

(without using  wait or send ):

ShellExecute(@DesktopDir & "\chrome.lnk", "https://autochords.com" & ' --disk-cache-dir="A:\Browser Cache"',"","")

For extra information check the AutoIt help file.

Share this post


Link to post
Share on other sites
dilligence

That works even better. Thanks!

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

  • Similar Content

    • stafe
      By stafe
      Hello
      I am trying to get chrome to save it's current webpage to a pdf using autoit.  I wold like to save the file into a folder on the desktop called "ChromeFiles" .  However when I use the send command chrome only occasionally responds.
      Thank you
      Simon
       
    • nooneclose
      By nooneclose
      I want to check some Excel data against data on a website in Chrome. I use Chrome because the site I use does not function properly in Internet Explorer or Firefox. I know how to do the Excel stuff I just can not figure out how to send to Chrome, let alone check to see if the data matches or not. I am also having trouble finding any help online while searching for Chrome functions for Autoit. I have a Chrome UDF installed but I still can not figure out how to get my code to properly function. (I am not posting code because I am  sure my code isn't right, to begin with)
      As usual, any and all help would be greatly appreciated. 
    • rudi
      By rudi
      Hello,
      usually I do Win automations, so I have no skills at all to handle HTML forms :-/
      The script to catch and syntax check  the required information from Excel is done.
      Now I'd like to automate the upload using this form, too:
       
      http://flashcardsdeluxe.com/flashcards/Upload.aspx
      What browser is easiest to do so? (IE, Chrome, FF) The Values $DeckCode, $DeckName, $DeckDefinition shall go to their HTML form fields finally "click" the button "upload flashcards" <table width="70%" class="cssCenter" border="0"> <tr> <td style="width: 1%">Deck&nbsp;Code</td> <td style="width: 100%"><input name="ctlDeckCode" type="text" id="ctlDeckCode" style="width:50%;" /> (no spaces allowed)</td> <td></td> </tr> <tr> <td style="width: 1%">Deck&nbsp;Name</td> <td style="width: 100%"><input name="ctlDeckName" type="text" id="ctlDeckName" style="width:50%;" /> (optional)</td> <td style="width: 1%" align="right"><input type="submit" name="ctlUpload" value="Upload Flashcards" id="ctlUpload" /></td> </tr> <tr> <td valign="top" style="padding-top: 5px" >Flashcard&nbsp;Text</td> <td colspan="2"><textarea name="ctlFlashcardText" rows="2" cols="20" id="ctlFlashcardText" style="height:280px;width:100%;"></textarea></td> </tr> </table> If someone kindly could jump in showing how to address just one of the input fields and how to "click" the "upload flashcards" button, I should be able to do the rest myself.
      TIA, Rudi.

    • TheWizEd
      By TheWizEd
      It seems AutoIt for Chrome is no longer working.  It's not in Google Store so not able to enable.  I can download the crx and drag to chrome but I can't figure out any way to enable the extension.
    • zxc3
      By zxc3
      Are there any examples of a script for Сhrome that allows you to check whether the information in the browser window has changed with a certain periodicity and signal this for 32-bit Windows.
×