Automating PhraseExpress file import

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
aliteralmind
Newbie
Posts: 14
Joined: Sun Jan 17, 2010 4:53 pm
Location: Philly
Contact:

Automating PhraseExpress file import

Post by aliteralmind » Thu May 03, 2012 9:45 pm

I am trying to automate a multi-file import into PhraseExpress (which is another macro program and key-stroke listener). That is, I'm trying to import multiple plain text files, each containing PhraseExpress macros, one per line. I'm trying to use Macro Scheduler to automate that process.

Specifically, I am manually dragging the files from Windows Explorer to the open PhraseExpress window (into a particular folder), using the mouse. When the start-import dialog opens, I then call a Macro Scheduler macro to do simple key-presses that iterate through the multiple dialogs--one per imported file.

Code: Select all

Let>i=iTotalFiles
Repeat>i
    Press Page Down
    Wait>iWaitSameFocus
    Press Up          //Desc-Content-Autotext
    Wait>iWaitSameFocus
    Press Tab
    Wait>iWaitSameFocus
    Press Tab         //Tab is the delimiter
    Wait>iWaitSameFocus
    Press Enter
    Wait>iWaitNewFocus
    Press Left        //Import dups
    Wait>iWaitSameFocus
    Press Enter
    Wait>iWaitNewFocus
    Let>i=i-1
    MessageModal>%i% more to go
Until>i<1
It's not working. Actually, I can see Page Down and Enter working, but the all the other presses (Up, Left, Tab) are not happening.

I realize that one macro program automating another may be pushing the envelope, but I'm only using it when the PhraseExpress editor is open, meaning that it's not listening to keystrokes.

I'm not sure where to start. I've tried explicitly focusing on the Window, as well as just finding the window via image detection and then clicking on the title bar (which is the center on the image I'm searching for) with the mouse, but although I can see the mouse moving and clicking the correct spot, neither is making a difference.

I would greatly appreciate a bit of advice here. Thank you.
:' )
aliteralmind

MY BOYS!
http://brothers.jeffyepstein.com

User avatar
aliteralmind
Newbie
Posts: 14
Joined: Sun Jan 17, 2010 4:53 pm
Location: Philly
Contact:

Post by aliteralmind » Thu May 03, 2012 9:52 pm

The pauses between the keystrokes is .5 seconds (SameFocus--stays in the same window) and 1 second (new focus).
:' )
aliteralmind

MY BOYS!
http://brothers.jeffyepstein.com

User avatar
aliteralmind
Newbie
Posts: 14
Joined: Sun Jan 17, 2010 4:53 pm
Location: Philly
Contact:

Post by aliteralmind » Sat May 05, 2012 7:06 pm

I am worried that I'm getting no response because the question regards a competitor product. I am using BOTH Macro Scheduler and PhraseExpress . I have more than 6,000 phrases in PhraseExpress, and as much as I would love to migrate it all over to MS, I need all macros that must be TRIGGERED BY A SERIES OF TYPED CHARACTERS, to remain in PhraseExpress. The official method of doing this with MS is (way) too slow: Trigger a PE or PhraseExpander macro with some type-written characters, which causes PE to execute an MS macro. It's practically instantaneous when the macro is directly in PE.

There are plenty of larger and more complex macros that I'm planning to use in MS, because startup-speed would not be critical. And programming in MS is (way) clearer than in PE, which has no linebreaks at all!

(Of course, I probably just didn't wait long enough for a response... :)

Anyway, thank you for considering my question. I need help.
:' )
aliteralmind

MY BOYS!
http://brothers.jeffyepstein.com

User avatar
aliteralmind
Newbie
Posts: 14
Joined: Sun Jan 17, 2010 4:53 pm
Location: Philly
Contact:

Post by aliteralmind » Sat May 12, 2012 11:06 am

Hello?
:' )
aliteralmind

MY BOYS!
http://brothers.jeffyepstein.com

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Sat May 12, 2012 10:25 pm

Hi aliteralmind,

I have something for you to try.

Here's a bit of the code you posted:

Press Tab
Wait>iWaitSameFocus
Press Tab //Tab is the delimiter

I have never seen MS code with a comment added on the end like that.

Sure you can do that in other programming languages like PHP but I don't think you can do that here.

Instead, add comments on their own line like the following...

Press Tab
Wait>iWaitSameFocus
//Tab is the delimiter
Press Tab

...then please let us know if things are working a little better. :)

Take care
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
aliteralmind
Newbie
Posts: 14
Joined: Sun Jan 17, 2010 4:53 pm
Location: Philly
Contact:

Post by aliteralmind » Sun May 13, 2012 3:02 pm

Oh my gosh!

I'm more a newbie than I thought!

That worked. THANK YOU.
:' )
aliteralmind

MY BOYS!
http://brothers.jeffyepstein.com

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