Batch file for HOME key?

Page 1 of 2 12 LastLast

  1. Posts : 8
    Windows 7 Ultimate x64
       #1

    Batch file for HOME key?


    Is it possible to write batch file to press Home key?,if not is there a way to push Home with a script?

    Thanks
      My Computer


  2. Posts : 5,092
    Windows 7 32 bit
       #2

    Welcome to the Forums.


    Autohotkey

    To send Home key when the script is run try this

    Code:
    #NoTrayIcon
    Sendmode Input
    Send {Home}
    It will send Home to the active window when run, then quit

    It can either be run as script or compiled to an exe file.

    Edit: AutoHotkey is free by the way.
      My Computer


  3. Posts : 8
    Windows 7 Ultimate x64
    Thread Starter
       #3

    Thanks milesahead
    tried with no luck,
      My Computer


  4. Posts : 5,092
    Windows 7 32 bit
       #4

    zplugger said:
    Thanks milesahead
    tried with no luck,
    That's rather vague. Without specific info there's nothing for me to do.
      My Computer


  5. Posts : 8
    Windows 7 Ultimate x64
    Thread Starter
       #5

    Here is what I get

    C:\larry\desktop\home.vbs
    Line 1
    Char:1
    Error: Expected statement
    Code: 800A0400
    Source Microsoft VBScript compilation error
      My Computer


  6. Posts : 5,092
    Windows 7 32 bit
       #6

    It's not VBScript. It's Autohotkey. I provided the link to download it.
      My Computer


  7. Posts : 8
    Windows 7 Ultimate x64
    Thread Starter
       #7

    Thanks MilesAhead
    this might be over my head a little until I learn.I download program and added new script.Now do I edit the script and clear notepad and paste your script here and save.Then do I compile it? Thanks for hanging in there with me.
      My Computer


  8. Posts : 5,092
    Windows 7 32 bit
       #8

    You can use any plain text editor. Notepad is fine. Save the script to a file with .ahk extension. Example home.ahk. Autohotkey comes with help that explains how to run programs.

    The thing is when you run this program it will send the home key to the active window as if you pressed it. So, if you are typing in a command prompt to run it, that will be the window that gets the home key sent to it. Probably not what you want. You should spell out more what you want to do with it and why you need the macro.

    There are dedicated forms for this already here:
    Support - AutoHotkey Community
      My Computer


  9. Posts : 8
    Windows 7 Ultimate x64
    Thread Starter
       #9

    Again Thank You for your time
    I can not make it work right, by clicking the script I'm not active to the program any more. What I have is a movie list program on my tv which is hooked to my computer. Trying to move around in program with only a wireless mouse,that part works great. There is times when I need to hit home key to default to top of list,with no keyboard thats hard to do.Been using OSK for a work around,but thats a pain all the time.Was hoping for a icon on task bar to do this,not sure how to push the icon and stay active in the program?, not sure this is possible.
      My Computer


  10. Posts : 5,092
    Windows 7 32 bit
       #10

    It can be done easily. Just explain what you need on that AHK forum in the link. Something easy like that I'm sure someone will help you out. That's what that forum is for.
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:11.
Find Us