Welcome, Guest. Please Login.
05/07/24 at 03:24:36
News:
Home Help Search Login


Pages: 1
Send Topic Print
vbscript gurus: give evo/dba the focus (Read 1301 times)
Kelloggs
Active Member
*****


Do crazy people know
they are crazy?

Posts: 785
Gender: male
vbscript gurus: give evo/dba the focus
05/26/09 at 10:29:41
 
I am trying to automate dba from another app using vbscript
 
Dim WShell
Set WShell = CreateObject("WScript.Shell")
WShell.AppActivate "Evo ~ ERP"
WShell.SendKeys "x"
 
I cannt get evo to maximize and get the focus
 
 lips sealed undecided
Back to top
 
 

Evo ERP - 35 Users
Dumped MS Access like a hot potato (VB.Net rules!!!)
Email WWW   IP Logged
kkmfg
Senior Member
****


Ghost of the code

Posts: 411
Gender: male
Re: vbscript gurus: give evo/dba the focus
Reply #1 - 05/26/09 at 11:46:28
 
first off, have you tried testing the return value of AppActivate? It will tell you whether it worked or not.
 
Also, it can activate an app based on only part of the title so maybe WShell.AppActivate "Evo" would work?
 
And, lastly, does typing X really do much of anything in Evo? Why send x?
Back to top
 
 

Collin
K & K Manufacturing, Inc

EvoERP Version 1-22-10 SP3
5 User Workgroup Pervasive 10
Email WWW   IP Logged
Kelloggs
Active Member
*****


Do crazy people know
they are crazy?

Posts: 785
Gender: male
Re: vbscript gurus: give evo/dba the focus
Reply #2 - 05/26/09 at 12:40:32
 
Dim WShell  
Set WShell = CreateObject("WScript.Shell")  
WShell.AppActivate "Evo ~ ERP" -------------------> use ALT-TAB and you will see the name. It doesnt work with anything other than "Evo ~ ERP"  
WShell.sendkeys "% "   -------------------> Open the Application Context Menu
WShell.sendkeys "R"  -------------------> the "R" will restore the window (Maximize), but with tas7 doesnt work
 
 
anyways, i was wondering if someone has try to do it
 
sendkeys to evo....
 
 Tongue
Back to top
 
 

Evo ERP - 35 Users
Dumped MS Access like a hot potato (VB.Net rules!!!)
Email WWW   IP Logged
Kelloggs
Active Member
*****


Do crazy people know
they are crazy?

Posts: 785
Gender: male
Re: vbscript gurus: give evo/dba the focus
Reply #3 - 06/01/09 at 12:43:20
 
This little script will give the focus to evo, then open a sales order. getting there!!
 
 
Dim WShell  
Set WShell = CreateObject("WScript.Shell")  
WShell.AppActivate "Evo ~ ERP"
WScript.Sleep 500
WShell.sendkeys "% x"
 
 
WShell.SendKeys "%"
WShell.SendKeys "M"
WScript.Sleep 50
WShell.SendKeys "M"
WScript.Sleep 50
WShell.SendKeys "O"
WScript.Sleep 50
WShell.sendkeys "{ENTER}"
WScript.Sleep 1000
WShell.sendkeys "{F2}"
WScript.Sleep 50
WShell.sendkeys "35324"
WShell.sendkeys "{ENTER}"
WScript.Sleep 50
WShell.sendkeys "{ENTER}"
 
 
 Cheesy
Back to top
 
 

Evo ERP - 35 Users
Dumped MS Access like a hot potato (VB.Net rules!!!)
Email WWW   IP Logged
Pages: 1
Send Topic Print