Fedex Ship Manager Integration

Started by AC, October 28, 2024, 04:10:06 PM

Previous topic - Next topic

AC

Hi,

First time posting. We are using very old version of WinBatch (WinBatch PopMenu 2003J) on our Fedex shipping station, which is still running Windows 7.  We are updating the station to a windows 10 station with the current version of WinBatch.

We use Fedex Ship Manager and its Fedex Integration Assistant (images are attached).  What WinBatch does for us is to automatically click on the "Start" button when Fedex Integration Assistant processes a shipment and print the shipping label.  I was hopping that I could just locate the script from our current system and paste it to the new WinBatch, but current WinBatch was setup way before I came to this company and I don't know where the script was saved.  Any suggestions on where to locate the script?

Ultimately, I would like to know how to create this script myself.  Based on the process, our ERP generates a imp.csv file and save it to the folder in c drive of the Shipping Station.  Fedex Ship Manager detect and input every corresponding field from the CSV file to the shipping screen (Name to Name, Company to Company ...etc).  When all fields are mapped in the background, WinBatch click on "Start" button on Fedex Integration Assistant, which always display on the same spot. 

Sorry, the system says my image didn't pass security check

AC

td

If you still have access to the old machine, check for the files with the ".mnw" extension. You should find them in the "C:\Program Files (x86)\WinBatch\System" folder, assuming a default WinBatch installation. There may be a file with your Fedex Integration Assistant application's main window name and the ".mnw" extension. You can also check the contents of the "popmenu.mnw" file which has the main PopMenu menus but can also be user-modified.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

AC

Below is the script I extracted from the old machine, but I am not sure if it does what I want?

         

RegOpenFlags(1) ; Tell WB to look at 32 bit registry on 64 bit systems
          homedir64=""
          ErrorMode(@OFF)
          wbdir=RegQueryStr(@REGMACHINE,"SOFTWARE\Wilson WindowWare\WinBatch\CurrentVersion")
          if wbdir==0
             wbdir=RegQueryStr(@REGMACHINE,"SOFTWARE\Wilson WindowWare\WinBatch Compiler\CurrentVersion")
          endif
          homedir64=RegQueryValue(@REGMACHINE, "SOFTWARE\Wilson WindowWare\WinBatch\CurrentSystem64")
          ErrorMode(@CANCEL)
          RegOpenFlags(0) ; Tell WB to resume default registry operations
          if homedir64==0 then homedir64=""
          if wbdir==0
             Display(5,"Error","Registry entries missing.  Re-install WinBatch")
             exit
          endif
          homedir=strcat(wbdir,"system\")
         
Two Explorers, side by side
         if WinVersion(1) >= 6
            winclass = "CabinetWClass"
            classcode = 1
         else
            winclass = "ExploreWClass"
            classcode = 0
         endif
         a = IntControl( 31, classcode, 0, 0, 0 )  ;return list of ids of explorer windows
         c = ItemCount( a, @TAB )
         switch c
            case 0
               ShellExecute( 'filemenu.exe',  '/separate,/e,C:\',  DirGet(), @Normal ,   '' )
               while FindWindow( winclass ) == ""    ;wait for it to come up
               TimeDelay( 0.1 )
               endwhile
               ;Fall into case 1
            case 1
               TimeDelay( 0.3 )
               ShellExecute( 'filemenu.exe',  '/separate,/e,C:\',  DirGet(), @Normal ,   '' )
               break
            case c       ; 2 or more
               break
         endswitch
         TimeDelay( 0.5 )
         d = 1
         while c < 2 && d < 100
            TimeDelay( 0.1 )
            a = IntControl( 31, classcode, 0, 0, 0 )
            c = ItemCount( a, @TAB )
            d = d + 1
         endwhile
         if c<2 then exit
         id1 = ItemExtract( 1, a, @TAB)
         id2 = ItemExtract( 2, a, @TAB)
         WinPlaceSet( @NORMAL, id2, "500 0 1000 900" )
         WinShow( id2 )
         WinActivate( id2 )
         TimeDelay( 0.2 )
         WinPlaceSet( @NORMAL, id1, "0 0 500 900" )
         WinShow( id1 )   
         WinActivate( id1 )

_&Freespace on Local Drives
        run("%homedir%winbatch.exe",'"%homedir%wwwmenu95.wil" FREESPACE2')

&System Information
       
       call("%homedir%wwwmenu95.wil","SYSINFO 'WinBatch Popmenu'")

Interactive WIL
        call("%homedir%wwwmenu95.wil","CMDSTACK NEWCMD")

&Blank Screen Now!
       a=IniReadPvt("Boot","SCRNSAVE.EXE","FLYING~1.SCR","SYSTEM.INI")
       ErrorMode(@OFF)
       LastError()
       run(a,"/s")
       ErrorMode(@CANCEL)
       if LastError() then Display(5,"Sorry","No screen blanker found")
ANSI/ASCII Char Charts
      exe=strcat(DirHome(),"winbatch.exe")
      par=strcat('"',DirHome(),"wshelp.dll",'" ',"WBCHARCHART")
      ShellExecute(exe, par, '', @NORMAL, "")
           
_Load Consolidated WIL help file
      ;WinHelp(strcat(wbdir,"Windows Interface Language.hlp"),"CONTENTS","")
      ShellExecute('WILHH.EXE', '"':wbdir:'ConsolidatedWIL.chm"', '', @NORMAL, "")
WinBatch Studio
      ShellExecute("WinBatch Studio.exe", "", "", @NORMAL, "")
WinBatch Navigator
      ShellExecute("winbatch.exe","default.wbt", "", @NORMAL, "")
WinBatch Compiler
      wbc=Strcat(DirHome(),"wbcompiler.exe")
      if FileLocate(wbc)==@FALSE
         Message("Error","WinBatch Compiler not installed")
      else
         ShellExecute(wbc,"", "", @NORMAL, "")
      endif
WinBatch Console
      cwb=Strcat(DirHome(),"cwinbatch.exe")
      if FileLocate(cwb)==@FALSE
         Message("Error","WinBatch Console not installed")
      else
         ShellExecute(cwb,"", "", @NORMAL, "")
      endif
_WinBatch Navigator 64-bit
      wb64=Strcat(homedir64,"winbatch.exe")
      if homedir64!="" && FileExist(wb64)
         ShellExecute(wb64,"default.wbt", "", @NORMAL, "")
      elseif WinMetrics(-7)==2
         Message("PopMenu Error","WinBatch 64-bit not installed")
      else
         Message("PopMenu Error","WinBatch 64-bit only available on 64-bit systems")         
      endif
WinBatch Compiler 64-bit
      wbc64=Strcat(homedir64,"wbcompiler.exe")
      if homedir64!="" && FileExist(wbc64)
         ShellExecute(wbc64,"", "", @NORMAL, "")
      elseif WinMetrics(-7)==2
         Message("PopMenu Error","WinBatch Compiler 64-bit not installed")
      else
         Message("PopMenu Error","WinBatch Compiler 64-bit only available on 64-bit systems")         
      endif
WinBatch Console 64-bit
      cwb64=Strcat(homedir64,"cwinbatch.exe")
      if homedir64!="" && FileExist(cwb64)
         ShellExecute(cwb64,"", "", @NORMAL, "")
      elseif WinMetrics(-7)==2
         Message("PopMenu Error","WinBatch 64-bit not installed")
      else
         Message("PopMenu Error","WinBatch 64-bit only available on 64-bit systems")         
      endif

td

You stated that you had WinBatch version 2003J. The Popmenu script you are showing is for a much newer version of WinBatch because 64-bit WinBatch did not exist in 2003. It is also just the stock menu that is shipped with WinBatch.  Application specific PopMenu menus are in separate menu files with the application's title as the root name for each application's file.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

Related, but not directly to your question, if there isn't a reason to not use the FedEx Shipping API I would recommend taking a look at that as an option.   Again, maybe that software you are using does more for you locally but if it just produces the shipping label the API might be an easier and smoother option for you.

Jim