Bridawg Posted November 12, 2009 Share Posted November 12, 2009 Hi, I'm just starting out and I've got a simple script which crashes every time i activate the hotkey #Include <Clipboard.au3> HotKeySet("a", "addLine") Func addLine() Send("{CTRLDOWN}c{CTRLUP}") $firstVal=_ClipBoard_GetData() Msgbox(0, $firstVal, "") Return EndFunc While 1 Sleep(10) WEnd The Windows Error Signature is: AppName: autoit3.exe AppVer: 3.3.0.0 ModName: ntdll.dll ModVer: 5.1.2600.3520 Offset: 00002caf any ideas? Thanks, Brian Link to comment Share on other sites More sharing options...
Zedna Posted November 12, 2009 Share Posted November 12, 2009 (edited) Try: Send("^c") and also try to add some sleep between Ctrl+C and getting data from clipboard EDIT: Also consider that Send() send it to active window so maybe it would be better/safer to use ControlSend() instead Edited November 12, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 12, 2009 Share Posted November 12, 2009 If you only want text you may want to try ClipGet(), maybe it works better? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Bridawg Posted November 18, 2009 Author Share Posted November 18, 2009 Guys thankyou very much for your help - I'll look into those commands as improvements - I'm still learning after defecting from a "similar product" I didn't reply sooner because I didn't get email notifications. Turns out I failed at the first rule of tech support - after rebooting it's behaving as I would expect. 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