gigi1 Posted October 3, 2010 Share Posted October 3, 2010 hi, as the title say, i'm trying to rewrite an AutoHotKey script into AutoIt, but i cannot find the autoit function for AHK's OnMessage, which monitors imput and start a function when data is received. thanks for help Link to comment Share on other sites More sharing options...
KaFu Posted October 3, 2010 Share Posted October 3, 2010 Look these up in the help-file: Opt("GUIOnEventMode", 1) GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents") GUICtrlSetOnEvent(-1, "OKPressed") OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
gigi1 Posted October 3, 2010 Author Share Posted October 3, 2010 no, maybe i didn't explained right. i need to have something monitoring the input from a windows API in a dll previously called. this is the code i need to import in autoit: OnMessage(0x3C1, "{the function it calls on received input}") Link to comment Share on other sites More sharing options...
KaFu Posted October 3, 2010 Share Posted October 3, 2010 GUIRegisterMsg() ? OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Realm Posted October 3, 2010 Share Posted October 3, 2010 (edited) gigi1, Welcome to the AutoIt Forums. I am not quite sure what you are referring to either, but it looks like you want to watch for a key to be pressed, and then call a function. You might want to look into HotKeySet() or _IsPressed(). Realm Edit: added another function to look into Edited October 3, 2010 by Realm My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. Link to comment Share on other sites More sharing options...
gigi1 Posted October 3, 2010 Author Share Posted October 3, 2010 i want to find what is the AutoIt version of this AutoHotKey functions: OnMessage (http://www.autohotkey.com/docs/commands/OnMessage.htm) this is because i'm trying to write in AutoIt parts of a script i found written in AutoHotKey language, and i'm stuck at this part: ; ----- the OnMessage listeners ---- ; #define MM_MIM_OPEN 0x3C1 /* MIDI input */ ; #define MM_MIM_CLOSE 0x3C2 ; #define MM_MIM_DATA 0x3C3 ; #define MM_MIM_LONGDATA 0x3C4 ; #define MM_MIM_ERROR 0x3C5 ; #define MM_MIM_LONGERROR 0x3C6 OnMessage(0x3C1, "MidiMsgDetect") ; calling the function MidiMsgDetect in get_midi_in.ahk OnMessage(0x3C2, "MidiMsgDetect") OnMessage(0x3C3, "MidiMsgDetect") OnMessage(0x3C4, "MidiMsgDetect") OnMessage(0x3C5, "MidiMsgDetect") OnMessage(0x3C6, "MidiMsgDetect") i'm sorry for not being clear, i hope this last post helps understanding. Link to comment Share on other sites More sharing options...
KaFu Posted October 3, 2010 Share Posted October 3, 2010 GUIRegisterMsg(0x3C1, "MidiMsgDetect") GUIRegisterMsg(0x3C2, "MidiMsgDetect") GUIRegisterMsg(0x3C3, "MidiMsgDetect") GUIRegisterMsg(0x3C4, "MidiMsgDetect") GUIRegisterMsg(0x3C5, "MidiMsgDetect") GUIRegisterMsg(0x3C6, "MidiMsgDetect") OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now