Jump to content

Recommended Posts

Posted

Is there a way to call an AutoHotKey script from an AutoIt script, if the AutoHotKey script has been compiled? I tried googling this as well as looking in the help for both and wasn't able to find anything.

Gotta keep on truckin' to find the perfect solution, but sometimes you run into roadblocks, so you gotta jam right through those roadblocks!!

Posted

Is there a way to call an AutoHotKey script from an AutoIt script, if the AutoHotKey script has been compiled? I tried googling this as well as looking in the help for both and wasn't able to find anything.

I don't know how is a AutoHotKey script but if is compiled I think should work Run() or ShellExecute().
Posted

Isn't AutoHotkey AutoIt v2?

Not exactly. It's based on AutoIt v2 but has some functions and syntax different from AutoIt v2.

@OP

Run(). It's compiled as EXE.

[center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center]
Posted

I tried with the following code:

Run("DevicesSet.exe", "C:\Scripts")

It didn't seem to work.

Thanks.

Gotta keep on truckin' to find the perfect solution, but sometimes you run into roadblocks, so you gotta jam right through those roadblocks!!

Posted

And it needn't be compiled. If you have the appropriate file extension associations, you can run it directly with Shellexecute:

ShellExecute("C:\Scripts\DevicesSet.ahk")

You may have to adjust the path, depending on where the AHK interpreter EXE is.

Posted

Try

Run("C:\Scripts\DevicesSet.exe")

I tried your suggestion and it worked for a single line in the AutoIt one line script.

Now I need to integrate it into my main script and see how it does. If it goes well then I'm done for this part, otherwise, back to the drawing board. I'll check it tomorrow and let you know.

Thanks a whole lot!!

Gotta keep on truckin' to find the perfect solution, but sometimes you run into roadblocks, so you gotta jam right through those roadblocks!!

Posted

I tried your suggestion and it worked for a single line in the AutoIt one line script.

Now I need to integrate it into my main script and see how it does. If it goes well then I'm done for this part, otherwise, back to the drawing board. I'll check it tomorrow and let you know.

Thanks a whole lot!!

I integrated the call to the AutoHotkey script (Run("c:\Program Files\Autohotkey\Autohotkey.exe c:\scripts\devicesset.ahk")) into my AutoIt script and it all worked fine. Now I just have two more issues to figure out. How to access the microphone and stereo mix devices in AutoHotkey. I used the MICROPHONE keyword in the SoundSet function call, but it didn't do anything to the microphone volume or mute. I am going to head over to the AutoHotkey forum and see what I can figure out.

Gotta keep on truckin' to find the perfect solution, but sometimes you run into roadblocks, so you gotta jam right through those roadblocks!!

Posted

I integrated the call to the AutoHotkey script (Run("c:\Program Files\Autohotkey\Autohotkey.exe c:\scripts\devicesset.ahk")) into my AutoIt script and it all worked fine. Now I just have two more issues to figure out. How to access the microphone and stereo mix devices in AutoHotkey. I used the MICROPHONE keyword in the SoundSet function call, but it didn't do anything to the microphone volume or mute. I am going to head over to the AutoHotkey forum and see what I can figure out.

I realize this isn't the place to ask this question, but it seems this forum might have a better idea about the AutoIt and AutoHotkey scripting methodologies integrating together. If anyone in this forum has any idea on how to use the SoundSet() function from AutoHotkey to set the volume and mute for the Realtek HD Audio microphones and stereo mix in a Vista system, please let me know. Here is my code for the microphone from the AutoHotkey script.

SoundSet, 0,MICROPHONE,MUTE,1
SoundSet, 100,MICROPHONE,VOLUME,1
SoundSet, 0,MICROPHONE:2,MUTE,1
SoundSet, 100,MICROPHONE:2,VOLUME,1

I appreciate any assistance and thanks in advance.

Gotta keep on truckin' to find the perfect solution, but sometimes you run into roadblocks, so you gotta jam right through those roadblocks!!

Posted

In this forum you can get help for AU3 functions, but not for AHK. The syntax and possible parameters are really different.

Possibly, you find those UDFs useful:

http://www.autoitscript.com/forum/index.ph...mp;#entry409587

or http://www.autoitscript.com/forum/index.ph...mp;#entry264605

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...