Author Topic: Problem with Script minimizing input box  (Read 5165 times)

aronson01

  • Newbie
  • *
  • Posts: 3
Problem with Script minimizing input box
« on: June 20, 2013, 11:37:16 am »
Hi.  At my organization, we're currently using an older version of Winbatch on Windows XP SP3.  We have used Winbatch to write a LOT of process scripts to automate our document flows into and out of various applications, such as Excel.  It has worked well for years.  We will be looking at getting a newer version of Winbatch when we move our desktop standard to Windows 7 later this year.  We are currently using PopMenu 97D and WIL Interpeter 2.4dpb (like I said, OLD).

We have had a weird issue come up with one user, and I was curious if anyone had any ideas what might be causing it.  We have a script (code shown below) that runs normally except for a couple of users.  The script opens a dialog box that is supposed to wait until the user inputs some information.  But for these two users, the box minimizes to the task bar after a few seconds and then cannot be opened again.  The process just hangs until I kill it.  Any ideas why this might happen?

Any suggestions would be appreciated.

Thanks.

Code: [Select]
; P:\Batch\PACL.wbt - Portfolio Appraisal & Cash Ledger PDFs to P:\Reports - PED 5/25/07

acrobat = "C:\Program Files\Adobe\Acrobat\Acrobat.exe"
apx = "http://apxapp/apx/ActivitySummary.aspx"
iebrowser = "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
reppath = "P:\Reports\"

:retype

apxaccount = StrLower(AskLine("Portfolio Appraisal & Cash Ledger PDFs", "Enter account code:", ""))
If StrSub(apxaccount,1,1) == "+"
  char3 = StrSub(apxaccount,3,1)
  char4 = StrSub(apxaccount,4,1)
  char5 = StrSub(apxaccount,5,1)
  char6 = StrSub(apxaccount,6,1)
  char7 = StrSub(apxaccount,7,1)
  char8 = StrSub(apxaccount,8,1)
  char9 = StrSub(apxaccount,9,1)
  Switch StrLen(apxaccount)
    Case 4
      account = StrCat(char3,char4)
      Break
    Case 5
      account = StrCat(char3,char4,char5)
      Break
    Case 6
      account = StrCat(char3,char4,char5,char6)
      Break
    Case 7
      account = StrCat(char3,char4,char5,char6,char7)
      Break
    Case 8
      account = StrCat(char3,char4,char5,char6,char7,char8)
      Break
    Case 9
      account = StrCat(char3,char4,char5,char6,char7,char8,char9)
      Break
  EndSwitch   
  account = StrUpper(account)
  apxaccount = StrCat("{+}@",StrLower(account))
  If account == "SPELALL" Then account = "SPEL"
  If account == "VATOT" Then account = "VA"
Else
  account = StrUpper(apxaccount)
EndIf

enddate = AskLine("Portfolio Appraisal & Cash Ledger PDFs", "Enter month end date (MMDDYY):", "")
Delay(8)
; Parse end date

edmonth = StrSub(enddate,1,2)
edday = StrSub(enddate,3,2)
edyear = StrSub(enddate,5,2)
edcent = "20"
begindate = "%edmonth%01%edyear%"
appfiledate = "%edcent%%edyear%_%edmonth%_%edday%" ; Like 2007_04_30
cashfiledate = "%edcent%%edyear%_%edmonth%" ; Like 2007_04

If !DirExist(StrCat(reppath,account,"\Recs\Appraisals"))
  makedir = AskYesNo("New Account?", StrCat(reppath,account,"\Recs\Appraisals doesn't exist.  Create it?"))
  If makedir ==@YES
    DirMake(StrCat(reppath,account,"\Recs\Appraisals"))
    DirMake(StrCat(reppath,account,"\Recs\Cash Ledgers"))
  EndIf
  If makedir ==@NO
    tryagain = AskYesNo("Try Again?","")
    If tryagain ==@YES
      GoTo retype
    Else
      Exit
    EndIf
  EndIf
EndIf

appfile = StrCat(reppath,account,"\Recs\Appraisals\AJO_",appfiledate,"_Portfolio_Appraisal_",account,".pdf")
cashfile = StrCat(reppath,account,"\Recs\Cash Ledgers\AJO_",cashfiledate,"_Cash_Ledger_",account,".pdf")

If FileExist(appfile)
  overapp = AskYesNo("File Exists","%appfile% exists.  Overwrite it?")
  If overapp ==@NO Then GoTo docashledger
  FileDelete(appfile)
EndIf

If WinExist("Activities") == @FALSE
  Run(iebrowser, apx)
  Delay(7)
EndIf
WinActivate("Activities")
Delay(3)
SendKey("^;")
Delay(3)
SendKey("m")
Delay(3)
SendKey("rpa")
Delay(7)
SendKey(apxaccount)
SendKey("{TAB}")
Delay(1)
SendKey(enddate)
Delay(1)
SendKey("{ENTER}")
Delay(5)
WinActivate("Appraisal")
SendKey("^p")
Delay(3)
SendKey("Adobe{ENTER}")
Delay(5)
SendKey(appfile)
SendKey("{ENTER}")
Delay(7)
WinClose("Appraisal")

:docashledger

If FileExist(cashfile)
  ;overcash = AskYesNo("File Exists","%cashfile% exists.  Overwrite it?") ; Always overwrite previous Cash Ledger, to keep in synch with Appraisal.
  ;If overcash ==@NO Then Exit
  FileDelete(cashfile)
EndIf

;If WinExist("Activities") == @FALSE
;  Run(iebrowser, apx)
;  Delay(7)
;EndIf
WinActivate("Activities")
Delay(3)
WinActivate("Activities")
Delay(4)
SendKey("^;")
Delay(4)
SendKey("m")
Delay(3)
SendKey("rpc")
Delay(7)
SendKey(apxaccount)
SendKey("{TAB}")
Delay(3)
SendKey(begindate)
Delay(1)
SendKey("{TAB}")
Delay(1)
SendKey(enddate)
Delay(1)
SendKey("{ENTER}")
Delay(5)
WinActivate("Cash Ledger")
SendKey("^p")
Delay(3)
SendKey("Adobe{ENTER}")
Delay(5)
SendKey(cashfile)
SendKey("{ENTER}")
Delay(7)
WinClose("Cash Ledger")

Display(2,"Portfolio Appraisal & Cash Ledger PDFs", "All Done!")


Deana

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: Problem with Script minimizing input box
« Reply #1 on: June 20, 2013, 11:46:30 am »
I suspect something running on this particular system is interfering with WinBatch. Check out the following tech article, where another user was having a similar issue: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/Functions+Ask~Function~Will~Not~Display.txt
Deana F.
Technical Support
Wilson WindowWare Inc.

aronson01

  • Newbie
  • *
  • Posts: 3
Re: Problem with Script minimizing input box
« Reply #2 on: June 20, 2013, 11:52:30 am »
Deana,
 thanks for the swift reply.  I'll investigate and let you know what we discover.

Thanks,
Dru.

aronson01

  • Newbie
  • *
  • Posts: 3
Re: Problem with Script minimizing input box
« Reply #3 on: June 21, 2013, 04:16:09 am »
Mystery Solved.  The logitech setpoint software that runs on the taskbar (to monitor battery level and allow you to custom program some of the keyboard buttons) was causing the problem.  As soon as we stopped it on both clients, their dialog boxes began working normally.

THANKS!

Deana

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: Problem with Script minimizing input box
« Reply #4 on: June 21, 2013, 07:55:34 am »
Mystery Solved.  The logitech setpoint software that runs on the taskbar (to monitor battery level and allow you to custom program some of the keyboard buttons) was causing the problem.  As soon as we stopped it on both clients, their dialog boxes began working normally.

THANKS!

Interesting Logitech is to blame in both situations. Could you please provide the version of the Logitech Setpoint software that you have installed. I would like to include that in the tech article.
Deana F.
Technical Support
Wilson WindowWare Inc.

td

  • Tech Support
  • *****
  • Posts: 2817
    • WinBatch
Re: Problem with Script minimizing input box
« Reply #5 on: June 21, 2013, 10:07:46 am »
Mystery Solved.  The logitech setpoint software that runs on the taskbar (to monitor battery level and allow you to custom program some of the keyboard buttons) was causing the problem.  As soon as we stopped it on both clients, their dialog boxes began working normally.

THANKS!

I use the Logitec software, as well.  (I have a Logitec keyboard, touchpad and mouse connected to my Workstation.)  If I recall correctly, the version that ships with the hardware was very buggy on Windows 7 and later but  I haven't had any problems since I installed the latest updates provided by Logitec.   Of course, your mileage my vary.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade