Making exe's and active window?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

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

Making exe's and active window?

Post by Dorian (MJT support) » Sat Jun 14, 2003 8:21 pm

Hi guys.

I have a little macro which is just one simple >sen command. I use this to type a long URL.

usually I just use a hotkey, but for one specific application I made an exe to do this, and right-dragged the exe to my toolbar. The idea is to click on the toolbar icon and the macro exe will then type the URL in for me.

However, as soon as i hit the icon, it deselects the active window, and then doesn't know where to sen> the text.

In the past I have used >GAW , and then just SETFOCUS>whatever the active window was. But of course, as soon as I hit that icon, the active window isn't the right one.

Is there any way around this?

Lumumba

Post by Lumumba » Mon Jun 16, 2003 11:15 am

Hi,
can you please provide the code you use.
I've tried something which worked fine.

Additionaly it would be interesting which OS you're using (W2K, W98SE, XP, ME, or NT with the ActiveDesktop AddOn).

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

Post by Dorian (MJT support) » Thu Jul 03, 2003 8:40 am

Hi, yes, I simply use the following. This works fine when just used with a hotkey on a machine with MS installed. But when using it on a machine with no MS installation and a simple EXE, of course it won't work.

sen>http://www.2trackit.com/2ti11.gif?111-

Lumumba

Post by Lumumba » Thu Jul 03, 2003 11:49 am

Why not compiling this into an exe?
Should open a separate IE instance connecting to the webpage.

Code: Select all

Run Program>iexplore "http://www.2trackit.com/2ti11.gif?111-"
Can't see the benefit to send a string. Could be interfered by whatever action, which takes the focus.

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

Post by Dorian (MJT support) » Thu Jul 03, 2003 5:12 pm

I want to make an exe, that's what I am having the trouble doing. All I need is to send a string which is actually the URL to an image. The string then needs to be left incomplete so the user can add his unique text at the end.

Here's what it's all about....

I have an email delivery confirmation service which requires the users to insert an image into an email, then add their acct# and unique email ID at the end of the string. So each time they type the URL to the image, most of it is the same, but the end is different. Like this :

http://www.2trackit.com/2ti11.gif?999-betty-james

http://www.2trackit.com/2ti11.gif?999-dan-henderson

999 is their account# so it will always be the same, but the recipient changes. The system then scans the logfiles and when it sees the subscribers account number (proving the email has been opened) it simply emails them the confirmation.

My aim is to make entering the "http://www.2trackit.com/2ti11.gif?999-" a little quicker. The user can open the email dialog as per normal, then "insert image", but I can't expect them to type that long URL without giving them a few quicker options.

So that's why I need something which will simply sen> some text. Or maybe I should write a small exe for Outlook Express, AOL, etc., opening an email and automatically embedding the image and leaving it open ended so they can add their unique string?

Lumumba

Post by Lumumba » Thu Jul 03, 2003 7:44 pm

:idea: What about this ...

Code: Select all

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!
Should work everywhere!

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Jul 04, 2003 12:18 am

Hi Lumumba,

Your wonderful script should work fine as long as CTRL-V is pressed immediately after your script is run. Otherwise , there's always a possibility that a user could press CTRL+C somewhere and sometime. Then, the mileage may vary. All control, flexibility and automation are lost without Macro Scheduler installed. The simplest way to attain Horoscopes2000's goal is to create a shortcut on Windows desktop without writing a single line of script. Just click the icon. That's it.

On the other hand, if the goal is total automation such as automatically entering userid+password, removing spam emails, retrieving emails...., then installaiton of Macro Scheduler is necessitated.

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

Post by Dorian (MJT support) » Fri Jul 04, 2003 3:27 am

Hi Armstrong,

Thank you for your input. Could you possibly expand on what you mean about the icon on the desktop please?

I want this to work on PC's which do not have Ms installed, which is the reason for the difficulty. If only EVERYONE could have Ms on their computer!

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Jul 04, 2003 3:47 am

Hi Horoscopes2000,

Just right-click a blank area on your Windows desktop. From the popup menu, choose New|Shortcut. Then, follow the wizard's instruction. Copy http://www.2trackit.com/2ti11.gif?999- (the literal) into the editbox of "Type the location of the item:"

The above guide is based on Windows XP Home. Your screen interface may vary.

Thanks for sharing your technical issues with us and your kind word.

Happy scripting.

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

Post by Dorian (MJT support) » Fri Jul 04, 2003 5:43 am

Hi Armstrong,

Alas, all this shortcut does is opens a webpage (http://www.2trackit.com/2ti11.gif?999-) containing the image.

I need to to simply type text. I'm beginning to think what I want to do is not actually possible.

Lumumba

Post by Lumumba » Fri Jul 04, 2003 5:59 am

Haleluja :roll: ,
if the user executes the compiled *.exe, I guess he/she does it cause the text should be "written" (imediately!).

Therefore there shouldn't be a need to press something different then CTRL+V inbetween.

But, if done by accident just execute the *.exe again. That's it!

H2K, please confirm that you've tested it, regardless that it's no rocket science.

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 » Fri Jul 04, 2003 6:01 am

I think you missed the solution earlier.

Assuming that Lumumba's script (the first one submitted) is good, then use Macro Scheduler Pro to make a compiled executable program.

Then there can be a shortcut icon on the desktop to this program, (installed on each machine, or called from a network share), so users do not need to have a copy of Macro Scheduler on their systems.

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Jul 04, 2003 1:38 pm

Bob,

Thanks for your rescue. BTW, all desktop icons can be assigned a hotkey. Just make sure to setfocus (in the compled .exe file) correctly back to the window of interest. Then, more or less we can attain H2K's goal.

Thank you for your valuable input.

Lumumba

Post by Lumumba » Fri Jul 04, 2003 4:06 pm

Proposed was:

a) compile the script
b) link the exe within the taskbar (had in mind that this was required)


Assuming the mail client or any other prefered window/app has the focus

1) click the link/shortcut --> fixed string has been pasted to the clipboard
focus will be back to the app (standard, nothing to do)
2) press CTRL+V --> string will be dropped to the active window/app

It's a clickclick thing!

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 » Fri Jul 04, 2003 11:04 pm

Good news and bad news:

Good news:
1. I made the following script.
2. Created a shortcut on the desktop.
3. Performed three successful tests:
A. Opened up WordPad. Positioned cursor. Double clicked on desktop icon, and text was entered as desired.
B. Opened up Outlook. Started new email message. Positioned cursor in body of new email. Double clicked on desktop icon, and text was entered as desired.
C. Opened up TextPad. Positioned cursor in body of text. Double clicked on desktop icon, and text was entered as desired.

Script code follows:
===========================
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%
Bad news:
When I compile the script, the compiled version does not work.
The three prompts come up, but nothing is sent to any of the three programs I tested.

Worse news:
This is about the third compiled program I have not been able to work properly! (Will have to make this a different forum subject).

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