Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Batch file for HOME key?

26 Aug 2014   #1
zplugger

Windows 7 Ultimate x64
 
 
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 System SpecsSystem Spec
.
26 Aug 2014   #2
MilesAhead

Windows 7 32 bit
 
 

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 System SpecsSystem Spec
26 Aug 2014   #3
zplugger

Windows 7 Ultimate x64
 
 

Thanks milesahead
tried with no luck,
My System SpecsSystem Spec
.

26 Aug 2014   #4
MilesAhead

Windows 7 32 bit
 
 

Quote   Quote: Originally Posted by zplugger View Post
Thanks milesahead
tried with no luck,
That's rather vague. Without specific info there's nothing for me to do.
My System SpecsSystem Spec
26 Aug 2014   #5
zplugger

Windows 7 Ultimate x64
 
 

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 System SpecsSystem Spec
26 Aug 2014   #6
MilesAhead

Windows 7 32 bit
 
 

It's not VBScript. It's Autohotkey. I provided the link to download it.
My System SpecsSystem Spec
26 Aug 2014   #7
zplugger

Windows 7 Ultimate x64
 
 

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 System SpecsSystem Spec
26 Aug 2014   #8
MilesAhead

Windows 7 32 bit
 
 

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 System SpecsSystem Spec
26 Aug 2014   #9
zplugger

Windows 7 Ultimate x64
 
 

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 System SpecsSystem Spec
26 Aug 2014   #10
MilesAhead

Windows 7 32 bit
 
 

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 System SpecsSystem Spec
Reply

 Batch file for HOME key?




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Sharing a single batch file for all home group Computers..
Hello, Here is my question. I have several computers on a home group. All the computer have program X on them. I need to run a batch file to start the program with some arguments that need to be changed often. I would like to have the computers all run the same batch file from shared location to...
Network & Sharing
I need a batch file to open a random file within a certain folder/path
I want a batch to select and open a random link file in a folder i have. All the links are music videos I like to listen to, and I kind of want to just have an option for 'surprise me!'. I can change the file names if I have to, and I have a basic batch file ability. I know the simple commands,...
General Discussion
How to run a batch file at logoff & some batch scripting help please
Hiya, I'd just like to run a simple batch file at logoff to backup some settings. I plan to use Robocopy, which is what i use to more thorough backups. Two questions: 1. How make it run by clicking Start > Shutdown? (i realise i could make a shutdown batch file and run it instead, but i'd...
Backup and Restore
Batch File that grabs file names from folder to insert into batch file
Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... :confused: First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg. Here's the code that I'm using: ffmpeg -i...
General Discussion
batch file open file for program in the startup folder
I have a computer that is a drone specifically for an outside LED sign. This computer is designed to never shut off and doesn't have any other program on it besides Operating System and the sign software. I need to create a batch file that I can place in the "start-up" folder that will open the...
General Discussion
How to create a batch file that will move files based on the file type
How to create a batch file that will move files based on the file type? My Requirement : I need a batch file to copy all .doc files in all my HardDisk to a removable disk say (Z: drive) . Can anyone make it possible using a batch file?Please...Its urgent...
General Discussion


Our Sites

Site Links

About Us

Find 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 15:41.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App