samozaparola Posted August 3, 2010 Share Posted August 3, 2010 (edited) I have noticed a different behavior in the compiled .exe versus the original interpreted .au3 AutoIt 3 project: When I try to pass Send("{CTRLDOWN}v{CTRLUP}") which is to simulate the Ctrl + v "paste" action, everything works as expected in the au3, but sends only the "v" in the compiled exe application. Edited August 3, 2010 by samozaparola Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 3, 2010 Moderators Share Posted August 3, 2010 (edited) samozaparola,Warning: This is only a SWAG*.Perhaps if you tried waiting a bit between the simulated key presses: Send("{CTRLDOWN}") Sleep(100) Send("v") Sleep(100) Send("{CTRLUP}")But I have never used Send in a compiled script, so I make no promises! M23* Either put your mouse over the SWAG above - or look here:SWAG = Scientific Wild-Ass Guess. A bit better than a WAG (Wild-Ass Guess), but not by much! Edit: See below! Edited August 4, 2010 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Tvern Posted August 3, 2010 Share Posted August 3, 2010 I once noticed a difference between compiled and uncompiled scripts and it turned out to be caused by my interpeted scripts being run as 64bit, while the I compiled to 32bit by default. Perhaps you're doing the same? Link to comment Share on other sites More sharing options...
trancexx Posted August 3, 2010 Share Posted August 3, 2010 (edited) Shouldn't "^v" be send?edit: or is it sent? Edited August 3, 2010 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
samozaparola Posted August 4, 2010 Author Share Posted August 4, 2010 Thank you guys for helping me with that issue! Tvern, it was developed and compiled on one and the same machine. Both Melba23 and trancexx (as far as I can remember, it has to be senT) examples do work, though there was a quotation mark displacement in the Melba23's example, so if anyone prefers his method,here it is: Send("{CTRLDOWN}") Sleep(100) Send("v") Sleep(100) Send("{CTRLUP}") Link to comment Share on other sites More sharing options...
Tvern Posted August 4, 2010 Share Posted August 4, 2010 It was developed and compiled on one and the same machine.They could still be run and compiled 32, or 64bit. And it seems a likely reason for differences in behavior. If you run "MsgBox(0,"test",@AutoItX64)" both interpeted and compiled, what are the results? Link to comment Share on other sites More sharing options...
samozaparola Posted August 4, 2010 Author Share Posted August 4, 2010 They could still be run and compiled 32, or 64bit. And it seems a likely reason for differences in behavior. If you run "MsgBox(0,"test",@AutoItX64)" both interpeted and compiled, what are the results?They both return "0". But the surprise was that both the script and the executable did well with Send("{CTRLDOWN}v{CTRLUP}") this time. I remember I got some UPX compress errors the first time I compiled each project (I used the right click menu option to start compilation). By your suggestion, I compiled a project with the 64 checkbox marked, and the exe won't run at all, i get an error message box: "The version of this file is not compatible with the version of Windows... "So I assume the compiled projects run faster which can cause some different behaviour.... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 4, 2010 Moderators Share Posted August 4, 2010 samozaparola,the compiled projects run faster which can cause some different behaviourThat was my guess which is why I suggested the Sleeps. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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