ResNullius Posted September 13, 2007 Share Posted September 13, 2007 The following code when run from SciTE will sometimes produce an error on the resetting of the hotkey to nothing, and sometimes not. However, I always get the error when running from the command line, as a compiled script, or running the script from the explorer context menu.The error is "Unknown function name" on the HotKeySet("{F3}", "") line. If I put a function name in there instead of nothing, of course it works fine. At first I thought it had to do with spaces or tabs before the line because that's what was in my original code, but doesn't seem to be consistent with that. Also, when running from SciTE does error, sometimes uncommenting the Sleep line will cause the error to go away. But again that's not consistent. Can anybody verify? Thanks. Tested with latest BETA & Production releases, on XP PRO SP2, & Windows 2000HotKeySet("{F3}", "_CtrlF") ;Sleep(1000) HotKeySet("{F3}", "") Func _CtrlF() Return EndFunc Link to comment Share on other sites More sharing options...
Developers Jos Posted September 13, 2007 Developers Share Posted September 13, 2007 shouldn't that be?: HotKeySet("{F3}", "_CtrlF") ;Sleep(1000) HotKeySet("{F3}") Func _CtrlF() Return EndFunc ;==>_CtrlF SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ResNullius Posted September 13, 2007 Author Share Posted September 13, 2007 shouldn't that be?: HotKeySet("{F3}", "_CtrlF") ;Sleep(1000) HotKeySet("{F3}") Func _CtrlF() Return EndFunc ;==>_CtrlFErmmm. I guess you're right. But has that behavior changed? I was resurectting some old code from about a year ago that I'm sure used to run fine. But, maybe not... and before I posted I did double check the help file and it says function [optional] The name of the function to call when the key is pressed. Leave blank to unset a previous hotkey.So of course I left it "blank" as in "", and not "out" as in not there at all. Rewording required on help file? (for dummies like me) :"> Also, I don't understand why sometimes SciTE will return the error when running it and sometimes not... Link to comment Share on other sites More sharing options...
Developers Jos Posted September 13, 2007 Developers Share Posted September 13, 2007 Also, I don't understand why sometimes SciTE will return the error when running it and sometimes not...I get the AU3check error for both the latest Production and Beta version.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ResNullius Posted September 13, 2007 Author Share Posted September 13, 2007 I get the AU3check error for both the latest Production and Beta version....More testing reveals that if I run it the first time, it catches the error, subsequent times it lets the error by, but only on My Windows 2000 machine, my XP system always catches it. What happens on the 2000 rig is that the first time, the Au3Check error window will pop up with the details, then of course the SciTE output panel will have the error details as well, including "ERROR: (): undefined function". Subsequent runs will not pop up the Au3Check window, and the ouput only provides the "AU3Check ended.rc:2" to indicate the error. (see below). >"D:\PROGRAM FILES\far\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "D:\PROGRAMMING\@MBIZ\HistViewer\ttest2.au3" /autoit3dir "D:\Program Files\Far\AutoIt3\beta" /UserParams +>14:17:42 Starting AutoIt3Wrapper v.1.9.3>Running AU3Check (1.54.9.0) from : D:\Program Files\Far\AutoIt3\beta!>14:17:42 AU3Check ended.rc:2>Running:(3.2.9.0): D:\Program Files\Far\AutoIt3\beta\autoit3.exe "D:\PROGRAMMING\@MBIZ\HistViewer\ttest2.au3" ->14:17:43 AutoIT3.exe ended.rc:1+>14:17:44 AutoIt3Wrapper Finished>Exit code: 1 Time: 1.911So I guess SciTE/Au3Check is always catching the error, just not fully? Or is my Scite4AutoIt installation suspect? Link to comment Share on other sites More sharing options...
MrCreatoR Posted September 13, 2007 Share Posted September 13, 2007 JdeB I already mention about this mistake in the help file, i think those ho new to AutoIt confused when they read.. function [optional] The name of the function to call when the key is pressed. Leave blank to unset a previous hotkey. It is not correct, and that's why they came here and ask unnecessary questions. There should be something like this: To unset a previous hotkey use only one parameter. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
ResNullius Posted September 13, 2007 Author Share Posted September 13, 2007 i think those ho new to AutoIt confused when they read.....It is not correct, and that's why they came here and ask unnecessary questions.Well, I'm not new to AutoIt, but I will admit to the occasional "asking of unnecessary questions" I agree though that the helpfile should be updated... Link to comment Share on other sites More sharing options...
Developers Jos Posted September 14, 2007 Developers Share Posted September 14, 2007 I agree though that the helpfile should be updated...poor excuse I have changed the Helpfile to read: "Not specifying this parameter will unset a previous hotkey." SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ResNullius Posted September 14, 2007 Author Share Posted September 14, 2007 poor excuse I have changed the Helpfile to read: "Not specifying this parameter will unset a previous hotkey."Thanks JdeB, and if you'll pardon the wordplay, I like to think that most of my excuses are pretty rich 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