AutoHotKey Experts?

For closing jobs you have the option of paste insert in the list tab the jobs with the close flag to true and the closing date.


Ephraim Feldman
Programmer / Analyst
Axis Lighting

-----Original Message-----
From: "Kerry_Muntz" <kerry_muntz@...>
Sender: vantage@yahoogroups.com
Date: Mon, 14 Feb 2011 18:33:22
To: <vantage@yahoogroups.com>
Reply-To: vantage@yahoogroups.com
Subject: [Vantage] Re: AutoHotKey Experts?

Macros are not usually the first choice as a solution - but there is a place for them. There are some things that simply can't be easily done any other way. Like any tool - they are dangerous in the hands of someone who doesn't take the time to learn how to use them safely.

We don't run service connect. BPMs are very good.

For job closing in particular, what do you recommend Jose? I am always keen to use the most elegant solution possible

The plus for using an external macro, as that the actions taken mimic a real user - so there is no direct table maintenance (or damage!), and leave the same kind of footprint.

Written and run properly, a macro is just another Vantage user, behaving very consistently. I recommend you build a great deal of error checking into any code that's not going to be 100% supervised.


Todd, we use Mouse and Key Recorder (MKR) from kratronic.com for a lot of our macro requirements, including job closure. MKR is good because it's quick and easy to learn, and you can communicate directly with the developer.

For other activities that are going to be more 'embedded' in Vantage, we compile AutoHotKey (AHK) programs, and call them from customizations. Again, these must have many failsafes built in. AHK is free, and more powerful than MKR, but is better for someone with at least a tiny bit of programming experience.

Jason, AutoHotKey can read from text files too. (MKR can too, for that matter.)

I'd be happy to email any macros that'd help. I've written hundreds.

Kerry.


--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> No offence, but you may want to look at Service Connect / BPMs or other
> inside Vantage options. Using external program macros is never a good thing.
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
>
> *Quis custodiet ipsos custodes?*
>
>
>
> On Mon, Feb 14, 2011 at 12:22 PM, cubcrafters_it <
> jason.navarrete@...> wrote:
>
> >
> >
> >
> >
> > AutoIt may be a little stronger for this type of task, as it can natively
> > open a text file and read from it (also, I've used it more often than I
> > AutoHotKey). Either way, the Window Spy (or Window Info) tool is your
> > friend. It'll give you window and control information.
> >
> > I have, however, had trouble sending (ControlSetText or ControlSend)
> > directly to textboxes in Epicor, so I have to set focus and use good old
> > 'Send' to key in text.
> >
> > So the following is code from an AutoIt mindset, but it should apply
> > closely to AutoHotKey if that's more you're thing.
> >
> > Run MES, login, and set focus to the Employee ID field:
> >
> > Run("c:\client803\client\mfgsys.exe -MES /config=test.mfgsys",
> > "c:\client803\client")
> > ProcessWait("MfgSys.exe")
> > WinWait("Log On", "")
> > ControlFocus("Log On", "", "[NAME:txtUserID]")
> > Send("<USERNAME>")
> > ControlFocus ( "Log On", "", "[NAME:txtPassword]" )
> > Send("<PASSWORD>")
> > ControlClick("Log On", "", "[NAME:btnOK]")
> > WinWaitActive("MES Menu")
> > ControlFocus("MES Menu", "", "[NAME:txtEmployeeID1]")
> >
> > And of course, you can modify your config file to autologin instead of
> > trying to automate it, but this is just an example...
> >
> > As far as handling warning and error messages, you can use AdlibRegister to
> > try and catch error boxes, but of course it's trial and error in order to
> > weed them out.
> >
> > If anyone knows how to send keys directly to a field, I'd be curious to
> > know.
> >
> >
> > --- In vantage@yahoogroups.com, tgilbert@ wrote:
> > >
> > > If anyone has some sample code for using AutoHotKey for automation of
> > data entry tasks within Vantage, I'd really appreciate seeing it (no matter
> > how simple or complex).
> > >
> > > My first project is to launch Vantage, open Job Closing, and close jobs
> > from a list found on an external file.
> > >
> > > I've gotten as far as having it launch the System Login but I haven't
> > gotten the delay right to send over the UID and pwd. I also haven't figured
> > out the correct syntax to deal with Vantage Warning or Notification Windows
> > that open under certain conditions (presumably IfWinExist, IfWinActive).
> > >
> > > Any help is appreciated!
> > >
> > > Thanks,
> > > Todd Gilbert
> > > GCM, Inc.
> > > Vantage 6.1
> > >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
If anyone has some sample code for using AutoHotKey for automation of data entry tasks within Vantage, I'd really appreciate seeing it (no matter how simple or complex).

My first project is to launch Vantage, open Job Closing, and close jobs from a list found on an external file.

I've gotten as far as having it launch the System Login but I haven't gotten the delay right to send over the UID and pwd. I also haven't figured out the correct syntax to deal with Vantage Warning or Notification Windows that open under certain conditions (presumably IfWinExist, IfWinActive).

Any help is appreciated!

Thanks,
Todd Gilbert
GCM, Inc.
Vantage 6.1
Todd here's a couple scripts, I don't remember the details of what they do any more - been out of the loop a while, but I believe they'll help you. The first is a simple template I use for looping. The second is a very in-depth one we used to manage conditions like you're asking.
Loop Template:
Loop 300 ;Enter Times to Loop
{
Sleep, 10
GetKeyState, state, ESC, P
if state = D
break
else
{
WinWait, Microsoft Excel - Xl0000002 [Read-Only],
IfWinNotActive, Microsoft Excel - Xl0000002 [Read-Only], , WinActivate, Microsoft Excel - Xl0000002 [Read-Only],
WinWaitActive, Microsoft Excel - Xl0000002 [Read-Only],
MouseClick, left, 240, 590
Sleep, 30000
MouseClick, left, 240, 590
Sleep, 30000
MouseClick, left, 346, 591
Sleep, 30000
MouseClick, left, 431, 588
Sleep, 30000
MouseClick, left, 34, 591
Sleep, 30000
MouseClick, left, 137, 588
Sleep, 30000

}
}


Manage conditions:
MsgBox,4, Instructions, Have the following windows been opened: `nVantage `nExcel `nSupplier Price List; making sure it is on the Default Tab with the Supplier Code entered
IfMsgBox No
return

InputBox, Title, Supplier List Name Entry,Enter the name of the supplier spreadsheet; not including "Microsoft Excel - ",, 280, 140
FullTitle := "Microsoft Excel - " . Title
If Errorlevel
return

InputBox, LoopNum, Number of Items,Enter the number of items to enter in Supplier Price List, , 215, 140,
If Errorlevel
return

Sleep, 2000
Loop %LoopNum%
{
Sleep, 10
GetKeyState, state, ESC, P
if state = D
break
else
{
WinActivate, %FullTitle%
Sleep, 1000
Send, {CTRLDOWN}c{CTRLUP}
Sleep, 500
Send, {RIGHT}
Sleep, 500
WinActivate , Supplier Price List
Sleep, 1000
MouseClick, left, 20, 70
Sleep, 6000
MouseClick, left, 343, 190
Sleep, 1000
Send, {CTRLDOWN}v{CTRLUP}
Sleep, 100
Send, {BACKSPACE}
Sleep, 500
Send, {TAB}
Sleep, 500
IfWinExist, Application Error
{
MsgBox,262192, An Error Has Occured , Please Restart Vantage
break
}
IfWinExist, Error
{
MsgBox,262192, An Error Has Occured , Please Delete Part and Restart This Program
break
}
Send, {SHIFTDOWN}{TAB}{SHIFTUP}
Sleep, 1000
WinActivate, %FullTitle%
Sleep, 1000
Send, {CTRLDOWN}c{CTRLUP}{RIGHT}
WinActivate , Supplier Price List
Sleep, 2000
Send, {CTRLDOWN}v{CTRLUP}
Sleep, 500
IfWinExist, Application Error
{
MsgBox,262192, An Error Has Occured , Please Restart Vantage
break
}
IfWinExist, Error
{
MsgBox,262192, An Error Has Occured , Please Delete Part and Restart This Program
break
}
Send {TAB}
Sleep, 200
Send {TAB}
Sleep, 200
Send {TAB}
Sleep, 200
Send {TAB}
Sleep, 200
Send {TAB}
Sleep, 1000
WinActivate, %FullTitle%
Sleep, 1000
Send, {CTRLDOWN}c{CTRLUP}{RIGHT}
WinActivate , Supplier Price List
Sleep, 1000
Send, {CTRLDOWN}v{CTRLUP}{BACKSPACE}
Sleep, 200
IfWinExist, Application Error
{
MsgBox,262192, An Error Has Occured , Please Restart Vantage
break
}
IfWinExist, Error
{
MsgBox,262192, An Error Has Occured , Please Delete Part and Restart This Program
break
}
Send {TAB}
Sleep, 200
Send {TAB}
Sleep, 200
Send {TAB}
Sleep, 200
Send {TAB}
Sleep, 200
Send {TAB}
Sleep, 200
Send {TAB}
Sleep, 200
Send {TAB}
Sleep, 200
Send {TAB}
Sleep, 200
Send {TAB}
Sleep, 1000
WinActivate, %FullTitle%
Sleep, 1000
Send, {CTRLDOWN}c{CTRLUP}{DOWN}{LEFT}{LEFT}{LEFT}
Sleep, 1000
WinActivate , Supplier Price List
Sleep, 1000
Send, {CTRLDOWN}v{CTRLUP}
MouseClick, left, 55, 75
Sleep, 3000
IfWinExist, Application Error
{
MsgBox,262192, An Error Has Occured , Please Restart Vantage
break
}
IfWinExist, Error
{
MsgBox,262192, An Error Has Occured , Please Delete Part and Restart This Program
break
}
}
}

Ken Williams
Vice President, Administrative Services
Intermountain Electronics, Inc.
O: 877-544-2291
M: 801-918-7318
F: 435-637-9601
www.ie-corp.com

Creating customer confidence through extraordinary service and experienced industry experts.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of tgilbert@...
Sent: Sunday, February 13, 2011 6:55 PM
To: vantage@yahoogroups.com
Subject: [Vantage] AutoHotKey Experts? - Email found in subject



If anyone has some sample code for using AutoHotKey for automation of data entry tasks within Vantage, I'd really appreciate seeing it (no matter how simple or complex).

My first project is to launch Vantage, open Job Closing, and close jobs from a list found on an external file.

I've gotten as far as having it launch the System Login but I haven't gotten the delay right to send over the UID and pwd. I also haven't figured out the correct syntax to deal with Vantage Warning or Notification Windows that open under certain conditions (presumably IfWinExist, IfWinActive).

Any help is appreciated!

Thanks,
Todd Gilbert
GCM, Inc.
Vantage 6.1



[Non-text portions of this message have been removed]
AutoIt may be a little stronger for this type of task, as it can natively open a text file and read from it (also, I've used it more often than I AutoHotKey). Either way, the Window Spy (or Window Info) tool is your friend. It'll give you window and control information.

I have, however, had trouble sending (ControlSetText or ControlSend) directly to textboxes in Epicor, so I have to set focus and use good old 'Send' to key in text.

So the following is code from an AutoIt mindset, but it should apply closely to AutoHotKey if that's more you're thing.

Run MES, login, and set focus to the Employee ID field:

Run("c:\client803\client\mfgsys.exe -MES /config=test.mfgsys", "c:\client803\client")
ProcessWait("MfgSys.exe")
WinWait("Log On", "")
ControlFocus("Log On", "", "[NAME:txtUserID]")
Send("<USERNAME>")
ControlFocus ( "Log On", "", "[NAME:txtPassword]" )
Send("<PASSWORD>")
ControlClick("Log On", "", "[NAME:btnOK]")
WinWaitActive("MES Menu")
ControlFocus("MES Menu", "", "[NAME:txtEmployeeID1]")

And of course, you can modify your config file to autologin instead of trying to automate it, but this is just an example...

As far as handling warning and error messages, you can use AdlibRegister to try and catch error boxes, but of course it's trial and error in order to weed them out.

If anyone knows how to send keys directly to a field, I'd be curious to know.




--- In vantage@yahoogroups.com, tgilbert@... wrote:
>
> If anyone has some sample code for using AutoHotKey for automation of data entry tasks within Vantage, I'd really appreciate seeing it (no matter how simple or complex).
>
> My first project is to launch Vantage, open Job Closing, and close jobs from a list found on an external file.
>
> I've gotten as far as having it launch the System Login but I haven't gotten the delay right to send over the UID and pwd. I also haven't figured out the correct syntax to deal with Vantage Warning or Notification Windows that open under certain conditions (presumably IfWinExist, IfWinActive).
>
> Any help is appreciated!
>
> Thanks,
> Todd Gilbert
> GCM, Inc.
> Vantage 6.1
>
No offence, but you may want to look at Service Connect / BPMs or other
inside Vantage options. Using external program macros is never a good thing.

*Jose C Gomez*
*Software Engineer*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>

*Quis custodiet ipsos custodes?*



On Mon, Feb 14, 2011 at 12:22 PM, cubcrafters_it <
jason.navarrete@...> wrote:

>
>
>
>
> AutoIt may be a little stronger for this type of task, as it can natively
> open a text file and read from it (also, I've used it more often than I
> AutoHotKey). Either way, the Window Spy (or Window Info) tool is your
> friend. It'll give you window and control information.
>
> I have, however, had trouble sending (ControlSetText or ControlSend)
> directly to textboxes in Epicor, so I have to set focus and use good old
> 'Send' to key in text.
>
> So the following is code from an AutoIt mindset, but it should apply
> closely to AutoHotKey if that's more you're thing.
>
> Run MES, login, and set focus to the Employee ID field:
>
> Run("c:\client803\client\mfgsys.exe -MES /config=test.mfgsys",
> "c:\client803\client")
> ProcessWait("MfgSys.exe")
> WinWait("Log On", "")
> ControlFocus("Log On", "", "[NAME:txtUserID]")
> Send("<USERNAME>")
> ControlFocus ( "Log On", "", "[NAME:txtPassword]" )
> Send("<PASSWORD>")
> ControlClick("Log On", "", "[NAME:btnOK]")
> WinWaitActive("MES Menu")
> ControlFocus("MES Menu", "", "[NAME:txtEmployeeID1]")
>
> And of course, you can modify your config file to autologin instead of
> trying to automate it, but this is just an example...
>
> As far as handling warning and error messages, you can use AdlibRegister to
> try and catch error boxes, but of course it's trial and error in order to
> weed them out.
>
> If anyone knows how to send keys directly to a field, I'd be curious to
> know.
>
>
> --- In vantage@yahoogroups.com, tgilbert@... wrote:
> >
> > If anyone has some sample code for using AutoHotKey for automation of
> data entry tasks within Vantage, I'd really appreciate seeing it (no matter
> how simple or complex).
> >
> > My first project is to launch Vantage, open Job Closing, and close jobs
> from a list found on an external file.
> >
> > I've gotten as far as having it launch the System Login but I haven't
> gotten the delay right to send over the UID and pwd. I also haven't figured
> out the correct syntax to deal with Vantage Warning or Notification Windows
> that open under certain conditions (presumably IfWinExist, IfWinActive).
> >
> > Any help is appreciated!
> >
> > Thanks,
> > Todd Gilbert
> > GCM, Inc.
> > Vantage 6.1
> >
>
>
>


[Non-text portions of this message have been removed]
We're on 6.1 so I don't believe those are options for us.

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Jose Gomez
Sent: Monday, February 14, 2011 9:24 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: AutoHotKey Experts?

No offence, but you may want to look at Service Connect / BPMs or other
inside Vantage options. Using external program macros is never a good
thing.

*Jose C Gomez*
*Software Engineer*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez>
<http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez>
<http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>

*Quis custodiet ipsos custodes?*



On Mon, Feb 14, 2011 at 12:22 PM, cubcrafters_it <
jason.navarrete@...> wrote:

>
>
>
>
> AutoIt may be a little stronger for this type of task, as it can
natively
> open a text file and read from it (also, I've used it more often than
I
> AutoHotKey). Either way, the Window Spy (or Window Info) tool is your
> friend. It'll give you window and control information.
>
> I have, however, had trouble sending (ControlSetText or ControlSend)
> directly to textboxes in Epicor, so I have to set focus and use good
old
> 'Send' to key in text.
>
> So the following is code from an AutoIt mindset, but it should apply
> closely to AutoHotKey if that's more you're thing.
>
> Run MES, login, and set focus to the Employee ID field:
>
> Run("c:\client803\client\mfgsys.exe -MES /config=test.mfgsys",
> "c:\client803\client")
> ProcessWait("MfgSys.exe")
> WinWait("Log On", "")
> ControlFocus("Log On", "", "[NAME:txtUserID]")
> Send("<USERNAME>")
> ControlFocus ( "Log On", "", "[NAME:txtPassword]" )
> Send("<PASSWORD>")
> ControlClick("Log On", "", "[NAME:btnOK]")
> WinWaitActive("MES Menu")
> ControlFocus("MES Menu", "", "[NAME:txtEmployeeID1]")
>
> And of course, you can modify your config file to autologin instead of
> trying to automate it, but this is just an example...
>
> As far as handling warning and error messages, you can use
AdlibRegister to
> try and catch error boxes, but of course it's trial and error in order
to
> weed them out.
>
> If anyone knows how to send keys directly to a field, I'd be curious
to
> know.
>
>
> --- In vantage@yahoogroups.com, tgilbert@... wrote:
> >
> > If anyone has some sample code for using AutoHotKey for automation
of
> data entry tasks within Vantage, I'd really appreciate seeing it (no
matter
> how simple or complex).
> >
> > My first project is to launch Vantage, open Job Closing, and close
jobs
> from a list found on an external file.
> >
> > I've gotten as far as having it launch the System Login but I
haven't
> gotten the delay right to send over the UID and pwd. I also haven't
figured
> out the correct syntax to deal with Vantage Warning or Notification
Windows
> that open under certain conditions (presumably IfWinExist,
IfWinActive).
> >
> > Any help is appreciated!
> >
> > Thanks,
> > Todd Gilbert
> > GCM, Inc.
> > Vantage 6.1
> >
>
>
>


[Non-text portions of this message have been removed]



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder
and Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
Macros are not usually the first choice as a solution - but there is a place for them. There are some things that simply can't be easily done any other way. Like any tool - they are dangerous in the hands of someone who doesn't take the time to learn how to use them safely.

We don't run service connect. BPMs are very good.

For job closing in particular, what do you recommend Jose? I am always keen to use the most elegant solution possible

The plus for using an external macro, as that the actions taken mimic a real user - so there is no direct table maintenance (or damage!), and leave the same kind of footprint.

Written and run properly, a macro is just another Vantage user, behaving very consistently. I recommend you build a great deal of error checking into any code that's not going to be 100% supervised.


Todd, we use Mouse and Key Recorder (MKR) from kratronic.com for a lot of our macro requirements, including job closure. MKR is good because it's quick and easy to learn, and you can communicate directly with the developer.

For other activities that are going to be more 'embedded' in Vantage, we compile AutoHotKey (AHK) programs, and call them from customizations. Again, these must have many failsafes built in. AHK is free, and more powerful than MKR, but is better for someone with at least a tiny bit of programming experience.

Jason, AutoHotKey can read from text files too. (MKR can too, for that matter.)

I'd be happy to email any macros that'd help. I've written hundreds.

Kerry.


--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> No offence, but you may want to look at Service Connect / BPMs or other
> inside Vantage options. Using external program macros is never a good thing.
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
>
> *Quis custodiet ipsos custodes?*
>
>
>
> On Mon, Feb 14, 2011 at 12:22 PM, cubcrafters_it <
> jason.navarrete@...> wrote:
>
> >
> >
> >
> >
> > AutoIt may be a little stronger for this type of task, as it can natively
> > open a text file and read from it (also, I've used it more often than I
> > AutoHotKey). Either way, the Window Spy (or Window Info) tool is your
> > friend. It'll give you window and control information.
> >
> > I have, however, had trouble sending (ControlSetText or ControlSend)
> > directly to textboxes in Epicor, so I have to set focus and use good old
> > 'Send' to key in text.
> >
> > So the following is code from an AutoIt mindset, but it should apply
> > closely to AutoHotKey if that's more you're thing.
> >
> > Run MES, login, and set focus to the Employee ID field:
> >
> > Run("c:\client803\client\mfgsys.exe -MES /config=test.mfgsys",
> > "c:\client803\client")
> > ProcessWait("MfgSys.exe")
> > WinWait("Log On", "")
> > ControlFocus("Log On", "", "[NAME:txtUserID]")
> > Send("<USERNAME>")
> > ControlFocus ( "Log On", "", "[NAME:txtPassword]" )
> > Send("<PASSWORD>")
> > ControlClick("Log On", "", "[NAME:btnOK]")
> > WinWaitActive("MES Menu")
> > ControlFocus("MES Menu", "", "[NAME:txtEmployeeID1]")
> >
> > And of course, you can modify your config file to autologin instead of
> > trying to automate it, but this is just an example...
> >
> > As far as handling warning and error messages, you can use AdlibRegister to
> > try and catch error boxes, but of course it's trial and error in order to
> > weed them out.
> >
> > If anyone knows how to send keys directly to a field, I'd be curious to
> > know.
> >
> >
> > --- In vantage@yahoogroups.com, tgilbert@ wrote:
> > >
> > > If anyone has some sample code for using AutoHotKey for automation of
> > data entry tasks within Vantage, I'd really appreciate seeing it (no matter
> > how simple or complex).
> > >
> > > My first project is to launch Vantage, open Job Closing, and close jobs
> > from a list found on an external file.
> > >
> > > I've gotten as far as having it launch the System Login but I haven't
> > gotten the delay right to send over the UID and pwd. I also haven't figured
> > out the correct syntax to deal with Vantage Warning or Notification Windows
> > that open under certain conditions (presumably IfWinExist, IfWinActive).
> > >
> > > Any help is appreciated!
> > >
> > > Thanks,
> > > Todd Gilbert
> > > GCM, Inc.
> > > Vantage 6.1
> > >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
Thanks for the thoughts Kerry. Any macro related to Job Closing would
be much appreciated!



Thanks,

Todd G.



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Kerry_Muntz
Sent: Monday, February 14, 2011 10:33 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: AutoHotKey Experts?





Macros are not usually the first choice as a solution - but there is a
place for them. There are some things that simply can't be easily done
any other way. Like any tool - they are dangerous in the hands of
someone who doesn't take the time to learn how to use them safely.

We don't run service connect. BPMs are very good.

For job closing in particular, what do you recommend Jose? I am always
keen to use the most elegant solution possible

The plus for using an external macro, as that the actions taken mimic a
real user - so there is no direct table maintenance (or damage!), and
leave the same kind of footprint.

Written and run properly, a macro is just another Vantage user, behaving
very consistently. I recommend you build a great deal of error checking
into any code that's not going to be 100% supervised.

Todd, we use Mouse and Key Recorder (MKR) from kratronic.com for a lot
of our macro requirements, including job closure. MKR is good because
it's quick and easy to learn, and you can communicate directly with the
developer.

For other activities that are going to be more 'embedded' in Vantage, we
compile AutoHotKey (AHK) programs, and call them from customizations.
Again, these must have many failsafes built in. AHK is free, and more
powerful than MKR, but is better for someone with at least a tiny bit of
programming experience.

Jason, AutoHotKey can read from text files too. (MKR can too, for that
matter.)

I'd be happy to email any macros that'd help. I've written hundreds.

Kerry.

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , Jose
Gomez <jose@...> wrote:
>
> No offence, but you may want to look at Service Connect / BPMs or
other
> inside Vantage options. Using external program macros is never a good
thing.
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez>
<http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez>
<http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
>
> *Quis custodiet ipsos custodes?*
>
>
>
> On Mon, Feb 14, 2011 at 12:22 PM, cubcrafters_it <
> jason.navarrete@...> wrote:
>
> >
> >
> >
> >
> > AutoIt may be a little stronger for this type of task, as it can
natively
> > open a text file and read from it (also, I've used it more often
than I
> > AutoHotKey). Either way, the Window Spy (or Window Info) tool is
your
> > friend. It'll give you window and control information.
> >
> > I have, however, had trouble sending (ControlSetText or ControlSend)
> > directly to textboxes in Epicor, so I have to set focus and use good
old
> > 'Send' to key in text.
> >
> > So the following is code from an AutoIt mindset, but it should apply
> > closely to AutoHotKey if that's more you're thing.
> >
> > Run MES, login, and set focus to the Employee ID field:
> >
> > Run("c:\client803\client\mfgsys.exe -MES /config=test.mfgsys",
> > "c:\client803\client")
> > ProcessWait("MfgSys.exe")
> > WinWait("Log On", "")
> > ControlFocus("Log On", "", "[NAME:txtUserID]")
> > Send("<USERNAME>")
> > ControlFocus ( "Log On", "", "[NAME:txtPassword]" )
> > Send("<PASSWORD>")
> > ControlClick("Log On", "", "[NAME:btnOK]")
> > WinWaitActive("MES Menu")
> > ControlFocus("MES Menu", "", "[NAME:txtEmployeeID1]")
> >
> > And of course, you can modify your config file to autologin instead
of
> > trying to automate it, but this is just an example...
> >
> > As far as handling warning and error messages, you can use
AdlibRegister to
> > try and catch error boxes, but of course it's trial and error in
order to
> > weed them out.
> >
> > If anyone knows how to send keys directly to a field, I'd be curious
to
> > know.
> >
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
tgilbert@ wrote:
> > >
> > > If anyone has some sample code for using AutoHotKey for automation
of
> > data entry tasks within Vantage, I'd really appreciate seeing it (no
matter
> > how simple or complex).
> > >
> > > My first project is to launch Vantage, open Job Closing, and close
jobs
> > from a list found on an external file.
> > >
> > > I've gotten as far as having it launch the System Login but I
haven't
> > gotten the delay right to send over the UID and pwd. I also haven't
figured
> > out the correct syntax to deal with Vantage Warning or Notification
Windows
> > that open under certain conditions (presumably IfWinExist,
IfWinActive).
> > >
> > > Any help is appreciated!
> > >
> > > Thanks,
> > > Todd Gilbert
> > > GCM, Inc.
> > > Vantage 6.1
> > >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
@Kerry
Well, what do you know, AHK *does* read files. Fancy that.

Have you had any trouble using SendInput (in AHK) to get keystrokes into Epicor input controls? I haven't tried...

--- In vantage@yahoogroups.com, "Kerry_Muntz" <kerry_muntz@...> wrote:
>
> Macros are not usually the first choice as a solution - but there is a place for them. There are some things that simply can't be easily done any other way. Like any tool - they are dangerous in the hands of someone who doesn't take the time to learn how to use them safely.
>
> We don't run service connect. BPMs are very good.
>
> For job closing in particular, what do you recommend Jose? I am always keen to use the most elegant solution possible
>
> The plus for using an external macro, as that the actions taken mimic a real user - so there is no direct table maintenance (or damage!), and leave the same kind of footprint.
>
> Written and run properly, a macro is just another Vantage user, behaving very consistently. I recommend you build a great deal of error checking into any code that's not going to be 100% supervised.
>
>
> Todd, we use Mouse and Key Recorder (MKR) from kratronic.com for a lot of our macro requirements, including job closure. MKR is good because it's quick and easy to learn, and you can communicate directly with the developer.
>
> For other activities that are going to be more 'embedded' in Vantage, we compile AutoHotKey (AHK) programs, and call them from customizations. Again, these must have many failsafes built in. AHK is free, and more powerful than MKR, but is better for someone with at least a tiny bit of programming experience.
>
> Jason, AutoHotKey can read from text files too. (MKR can too, for that matter.)
>
> I'd be happy to email any macros that'd help. I've written hundreds.
>
> Kerry.
>
>
> --- In vantage@yahoogroups.com, Jose Gomez <jose@> wrote:
> >
> > No offence, but you may want to look at Service Connect / BPMs or other
> > inside Vantage options. Using external program macros is never a good thing.
> >
> > *Jose C Gomez*
> > *Software Engineer*
> > *
> > *T: 904.469.1524 mobile
> > E: jose@
> > http://www.josecgomez.com
> > <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> > <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> > <http://www.josecgomez.com/professional-resume/>
> > <http://www.josecgomez.com/feed/>
> >
> > *Quis custodiet ipsos custodes?*
> >
> >
> >
> > On Mon, Feb 14, 2011 at 12:22 PM, cubcrafters_it <
> > jason.navarrete@> wrote:
> >
> > >
> > >
> > >
> > >
> > > AutoIt may be a little stronger for this type of task, as it can natively
> > > open a text file and read from it (also, I've used it more often than I
> > > AutoHotKey). Either way, the Window Spy (or Window Info) tool is your
> > > friend. It'll give you window and control information.
> > >
> > > I have, however, had trouble sending (ControlSetText or ControlSend)
> > > directly to textboxes in Epicor, so I have to set focus and use good old
> > > 'Send' to key in text.
> > >
> > > So the following is code from an AutoIt mindset, but it should apply
> > > closely to AutoHotKey if that's more you're thing.
> > >
> > > Run MES, login, and set focus to the Employee ID field:
> > >
> > > Run("c:\client803\client\mfgsys.exe -MES /config=test.mfgsys",
> > > "c:\client803\client")
> > > ProcessWait("MfgSys.exe")
> > > WinWait("Log On", "")
> > > ControlFocus("Log On", "", "[NAME:txtUserID]")
> > > Send("<USERNAME>")
> > > ControlFocus ( "Log On", "", "[NAME:txtPassword]" )
> > > Send("<PASSWORD>")
> > > ControlClick("Log On", "", "[NAME:btnOK]")
> > > WinWaitActive("MES Menu")
> > > ControlFocus("MES Menu", "", "[NAME:txtEmployeeID1]")
> > >
> > > And of course, you can modify your config file to autologin instead of
> > > trying to automate it, but this is just an example...
> > >
> > > As far as handling warning and error messages, you can use AdlibRegister to
> > > try and catch error boxes, but of course it's trial and error in order to
> > > weed them out.
> > >
> > > If anyone knows how to send keys directly to a field, I'd be curious to
> > > know.
> > >
> > >
> > > --- In vantage@yahoogroups.com, tgilbert@ wrote:
> > > >
> > > > If anyone has some sample code for using AutoHotKey for automation of
> > > data entry tasks within Vantage, I'd really appreciate seeing it (no matter
> > > how simple or complex).
> > > >
> > > > My first project is to launch Vantage, open Job Closing, and close jobs
> > > from a list found on an external file.
> > > >
> > > > I've gotten as far as having it launch the System Login but I haven't
> > > gotten the delay right to send over the UID and pwd. I also haven't figured
> > > out the correct syntax to deal with Vantage Warning or Notification Windows
> > > that open under certain conditions (presumably IfWinExist, IfWinActive).
> > > >
> > > > Any help is appreciated!
> > > >
> > > > Thanks,
> > > > Todd Gilbert
> > > > GCM, Inc.
> > > > Vantage 6.1
> > > >
> > >
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
I use both Send (with key delay) and SendInput - especially the latter for inputting variables.

I recommend using customization to add ALT shortcuts to Vantage Tabs (ie to underline a letter in the TextTab description by precursing it with an "&" sign). This enables more precise window navigation.


--- In vantage@yahoogroups.com, "cubcrafters_it" <jason.navarrete@...> wrote:
>
> @Kerry
> Well, what do you know, AHK *does* read files. Fancy that.
>
> Have you had any trouble using SendInput (in AHK) to get keystrokes into Epicor input controls? I haven't tried...
>
> --- In vantage@yahoogroups.com, "Kerry_Muntz" <kerry_muntz@> wrote:
> >
> > Macros are not usually the first choice as a solution - but there is a place for them. There are some things that simply can't be easily done any other way. Like any tool - they are dangerous in the hands of someone who doesn't take the time to learn how to use them safely.
> >
> > We don't run service connect. BPMs are very good.
> >
> > For job closing in particular, what do you recommend Jose? I am always keen to use the most elegant solution possible
> >
> > The plus for using an external macro, as that the actions taken mimic a real user - so there is no direct table maintenance (or damage!), and leave the same kind of footprint.
> >
> > Written and run properly, a macro is just another Vantage user, behaving very consistently. I recommend you build a great deal of error checking into any code that's not going to be 100% supervised.
> >
> >
> > Todd, we use Mouse and Key Recorder (MKR) from kratronic.com for a lot of our macro requirements, including job closure. MKR is good because it's quick and easy to learn, and you can communicate directly with the developer.
> >
> > For other activities that are going to be more 'embedded' in Vantage, we compile AutoHotKey (AHK) programs, and call them from customizations. Again, these must have many failsafes built in. AHK is free, and more powerful than MKR, but is better for someone with at least a tiny bit of programming experience.
> >
> > Jason, AutoHotKey can read from text files too. (MKR can too, for that matter.)
> >
> > I'd be happy to email any macros that'd help. I've written hundreds.
> >
> > Kerry.
> >
> >
> > --- In vantage@yahoogroups.com, Jose Gomez <jose@> wrote:
> > >
> > > No offence, but you may want to look at Service Connect / BPMs or other
> > > inside Vantage options. Using external program macros is never a good thing.
> > >
> > > *Jose C Gomez*
> > > *Software Engineer*
> > > *
> > > *T: 904.469.1524 mobile
> > > E: jose@
> > > http://www.josecgomez.com
> > > <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> > > <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> > > <http://www.josecgomez.com/professional-resume/>
> > > <http://www.josecgomez.com/feed/>
> > >
> > > *Quis custodiet ipsos custodes?*
> > >
> > >
> > >
> > > On Mon, Feb 14, 2011 at 12:22 PM, cubcrafters_it <
> > > jason.navarrete@> wrote:
> > >
> > > >
> > > >
> > > >
> > > >
> > > > AutoIt may be a little stronger for this type of task, as it can natively
> > > > open a text file and read from it (also, I've used it more often than I
> > > > AutoHotKey). Either way, the Window Spy (or Window Info) tool is your
> > > > friend. It'll give you window and control information.
> > > >
> > > > I have, however, had trouble sending (ControlSetText or ControlSend)
> > > > directly to textboxes in Epicor, so I have to set focus and use good old
> > > > 'Send' to key in text.
> > > >
> > > > So the following is code from an AutoIt mindset, but it should apply
> > > > closely to AutoHotKey if that's more you're thing.
> > > >
> > > > Run MES, login, and set focus to the Employee ID field:
> > > >
> > > > Run("c:\client803\client\mfgsys.exe -MES /config=test.mfgsys",
> > > > "c:\client803\client")
> > > > ProcessWait("MfgSys.exe")
> > > > WinWait("Log On", "")
> > > > ControlFocus("Log On", "", "[NAME:txtUserID]")
> > > > Send("<USERNAME>")
> > > > ControlFocus ( "Log On", "", "[NAME:txtPassword]" )
> > > > Send("<PASSWORD>")
> > > > ControlClick("Log On", "", "[NAME:btnOK]")
> > > > WinWaitActive("MES Menu")
> > > > ControlFocus("MES Menu", "", "[NAME:txtEmployeeID1]")
> > > >
> > > > And of course, you can modify your config file to autologin instead of
> > > > trying to automate it, but this is just an example...
> > > >
> > > > As far as handling warning and error messages, you can use AdlibRegister to
> > > > try and catch error boxes, but of course it's trial and error in order to
> > > > weed them out.
> > > >
> > > > If anyone knows how to send keys directly to a field, I'd be curious to
> > > > know.
> > > >
> > > >
> > > > --- In vantage@yahoogroups.com, tgilbert@ wrote:
> > > > >
> > > > > If anyone has some sample code for using AutoHotKey for automation of
> > > > data entry tasks within Vantage, I'd really appreciate seeing it (no matter
> > > > how simple or complex).
> > > > >
> > > > > My first project is to launch Vantage, open Job Closing, and close jobs
> > > > from a list found on an external file.
> > > > >
> > > > > I've gotten as far as having it launch the System Login but I haven't
> > > > gotten the delay right to send over the UID and pwd. I also haven't figured
> > > > out the correct syntax to deal with Vantage Warning or Notification Windows
> > > > that open under certain conditions (presumably IfWinExist, IfWinActive).
> > > > >
> > > > > Any help is appreciated!
> > > > >
> > > > > Thanks,
> > > > > Todd Gilbert
> > > > > GCM, Inc.
> > > > > Vantage 6.1
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
>