Making exe's and active window?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Lumumba

Post by Lumumba » Sat Jul 05, 2003 6:41 am

Is the clipboard solution working if compiled to an exe?

Lumumba

Post by Lumumba » Sat Jul 05, 2003 1:10 pm

So, to compile the send>command seems to be buggy.
Have you had a try to compile the fixed string as ASCII>command ? :wink:

Mixed up our proposals:

Code: Select all

.
.
.
PutClipboard>http://www.2trackit.com/2ti11.gif?%Account%-%FirstName%-%LastName%
Will this work? (sorry don't have a compiler, to test it on my own)

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Jul 05, 2003 6:03 pm

Compiled version of clipboard version does not work.
When running the exe, the hourglass comes up, but goes away in a few moments. If I press CTL-V the previous contents of the clipboard is pasted in, not the code from the script line.

Here is the script that runs OK before being compiled, but not when compiled:
======================
PutClipboard>http://www.2trackit.com/2ti11.gif?999-
MessageModal>Push CTRL+V to transfer the URL of Horoscope's email delivery confirmation service to your application.%CRLF%Bye!
=======================
This program is actually still in memory in background, and I need to do CTRL-ALT-DEL to close the program from the Close window. It is possible to have multiple copies running, because there is no error message.
=====================
And as a reference from my earlier posting, the following script runs OK as script, but not compiled:
Input>Account,Enter your three digit account...............,999
Input>FirstName,Enter your first name in lower case.
Input>LastName,Enter your last name in lower case.
Wait>.1
Send>http://www.2trackit.com/2ti11.gif?%Acco ... -%LastName%
====================
BUT....Compiled version of combined versions does work!

Here is the combined script that runs OK after being compiled:
Input>Account,Enter your three digit account...............,999
Input>FirstName,Enter your first name in lower case.
Input>LastName,Enter your last name in lower case.
Wait>.1
PutClipboard>http://www.2trackit.com/2ti11.gif?%Acco ... -%LastName%
MessageModal>Push CTRL+V to transfer the URL of Horoscope's email delivery confirmation service to your application.%CRLF%Bye!
=======================

There appears to be some rules about compiled scripts that are not totally clear at this point?

Compiled scripts did not work when:
1. Using Send> to write the line.
2. Using PutClipboard> if not using a variable.

More investigation to be done here...stay tuned.....

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Jul 05, 2003 6:28 pm

OK....more info about the "non-working" compiled scripts.

It looks like part of the problem may be the shortcuts that I made for them. When I made the shortcuts, I right clicked and dragged from folder to desktop and chose to "Create Shortcut(s) Here". Some of the macros were on a local machine, and some were on a drive mapped to a remote server.

I noticed that the ones called from the server were not working, but OK if called from the local machine. Looking deeper, I also found that changing the Target and Start In paths from mapped drives to UNC names seems to resolve the issue for those called from the server. Don't know if both need to be changed......

Stay tuned for more testing and results.

Preliminary rules for shortcuts to compiled macros seem to be that you must use UNC names if not calling from a local machine. Any comments from Macro Scheduler about this?

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1354
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Post by Dorian (MJT support) » Thu Jul 24, 2003 6:10 am

At long last I am getting somewhere with this. This simple vbs script works fine. I saved it as a .vbs file then set a desktop shortcut key. It now sends the text to the active window :

set objWshShell = WScript.CreateObject("WScript.Shell")
objWshShell.SendKeys "sample text"

Now all I have to do is make in somehow installable so others can install it without having to manually assign a shortcut key. Oh, and Norton Antivirs sometimes thinks it's a malicious code. :(

Maybe I can make an exe macro using the vbscript, and use some kind of "installer software" which allows me to assign the shortcut key during installation?

But I feel I am getting somewhere at last..........

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts