Jump to content

Problem with compiled AutoIt project


Recommended Posts

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 by samozaparola
Link to comment
Share on other sites

  • Moderators

samozaparola,

Warning: This is only a SWAG*.

Perhaps if you tried waiting a bit between the simulated key presses: :blink:

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! :P

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 by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

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

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

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

  • Moderators

samozaparola,

the compiled projects run faster which can cause some different behaviour

That was my guess which is why I suggested the Sleeps. :blink:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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