web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Macro to start and login to GP

(0) ShareShare
ReportReport
Posted on by 1,445

I have created a macro by opening Great Plains but not log in yet.  I have the open file set to open at my login screen.  I hit alt-F8 and start my procedures for logging in, changing printer, etc and then go to tools and stop the macro.  I create a shortcut key in GP and then close out.  When I go to run the macro, it opens Great Plains but then goes to make me choose the set file to launch it.  If I click on it, it opens up my login but does not run the rest of the macro.  Please help and let me know what step I missed.  Also, I opened the macro in Notepad and took out the first line and added logging file 'macro.log'.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    soma Profile Picture
    24,410 on at
  • MCARTER Profile Picture
    1,445 on at

    I have done all of the procedures in both links and I now have it set for my shortcut to open at the login screen.  I run the whole macro but when i click on the shortcut for the GP macro, it still is telling me to choose my launch file.

    CheckActiveWin dictionary 'default'  form Login window Login

    logging file 'macro.log'

     TypeTo field Password , '02150215'

     MoveTo field 'OK Button'

     ClickHit field 'OK Button'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form 'Switch Company' window 'Switch Company'

     ClickHit field '(L) Company Names' item 4  # 'ICM OF AMERICA'

     MoveTo field 'OK Button'

     ClickHit field 'OK Button'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ClickHitIE , 'dexterity/.../&; # http://dexterity will be pre-pended

    NewActiveWin dictionary 'DEX.DIC'  form 'View Product Triggers' window 'View Client-Side Triggers'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

    # Key 1: '0'

     MoveTo line 6 browsewin 'Product List'

     MoveTo field '(L) Disable'

     ClickHit field '(L) Disable'

    CloseWindow dictionary 'DEX.DIC'  form 'View Product Triggers' window 'View Client-Side Triggers'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

     CommandExec form BuiLtin command cmdPrintSetup

    ActivateWindow dictionary 'default'  form sheLL window sheLL

  • MCARTER Profile Picture
    1,445 on at

    OK so i dug a little deeper and missed how to run the task scheduler.

    I set all of it up and now when I run it as a batch file in scheduler, it opens up the run window and then opens up the GP to the logon screen.  From there it just sits there and does not run the rest of the macro to log in.

    CheckActiveWin dictionary 'default'  form Login window Login

    logging file 'macro.log'

     TypeTo field Password , '02150215'

     MoveTo field 'OK Button'

     ClickHit field 'OK Button'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form 'Switch Company' window 'Switch Company'

     ClickHit field '(L) Company Names' item 4  # 'ICM OF AMERICA'

     MoveTo field 'OK Button'

     ClickHit field 'OK Button'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ClickHitIE , 'dexterity/.../&; # http://dexterity will be pre-pended

    NewActiveWin dictionary 'DEX.DIC'  form 'View Product Triggers' window 'View Client-Side Triggers'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

     ScrollToEnd down scrollwin 'Product List'

    # Key 1: '0'

     MoveTo line 6 browsewin 'Product List'

     MoveTo field '(L) Disable'

     ClickHit field '(L) Disable'

    CloseWindow dictionary 'DEX.DIC'  form 'View Product Triggers' window 'View Client-Side Triggers'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

     CommandExec form BuiLtin command cmdPrintSetup

    ActivateWindow dictionary 'default'  form sheLL window sheLL

  • soma Profile Picture
    24,410 on at

    mcarte,

    The below macro are the automatic login for GP.

    CheckActiveWin dictionary 'default'  form Login window Login

    logging file 'macro.log'

    TypeTo field Password , '02150215'

    MoveTo field 'OK Button'

    ClickHit field 'OK Button'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form 'Switch Company' window 'Switch Company'

    ClickHit field '(L) Company Names' item 4  # 'ICM OF AMERICA'

    MoveTo field 'OK Button'

    ClickHit field 'OK Button

    May I know the rest of the macro content usage?

    Have you tried to do something with macro for automatic GP login & some tasks?

  • Suggested answer
    soma Profile Picture
    24,410 on at

    If you use the macro file with only on above mentioned content, then your GP will automatically opens while running the batch file.

    Hope this helps!!!

  • Suggested answer
    L Vail Profile Picture
    65,271 on at

    mcarter,

    It sounds to me like your shortcut does not have all of the necessary information in it. You need to first tell it where the dynamics.exe file is, and then the Dynamics.set file's location, and finally the name of the macro file. So, your shortcut might look something like this:

    "C:\Program Files (x86)\Microsoft Dynamics\GP2013\Dynamics.exe"

    "C:\DynamicsShare\Dynamics.set"

    "C:\DynamicsShare\Macros\login.mac"

    This would all be on one line and there would be a space between each element. If you wanted to specify a particular .ini file, that would go between the .set file and the .mac file.

    You also might take a peek at the log file if you have a logging file specified in the macro.

    Kind regards,

    Leslie

  • Suggested answer
    soma Profile Picture
    24,410 on at

    mcarter,

    For you reference, please have a look on the below my sample Macro & Batch file content.

    Macro File:

    # DEXVERSION=11.00.0349.000 2 2

    Logging file 'LOGIN.LOG'

    CheckActiveWin dictionary 'default'  form Login window Login

     MoveTo field Password

     TypeTo field Password , 'pass@123'

     MoveTo field 'OK Button'

     ClickHit field 'OK Button'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form 'Switch Company' window 'Switch Company'

     ClickHit field '(L) Company Names' item 1  # 'Fabrikam, Inc.'

     MoveTo field 'OK Button'

     ClickHit field 'OK Button'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    # You have chosen to use the sample company, which provides data that you can use to practice procedures or learn more about the product. When you use this sample company, the date is automatically set to April 12, 2017.

    NewActiveWin dictionary 'default'  form DiaLog window DiaLog

     ClickHit field OK

     

    Batch File:

    CD C:\Program Files (x86)\Microsoft Dynamics\GP2013\
    Dynamics.exe Dynamics.set Start.mac
    exit

    Note: My macro (Start.mac) is located under the GP installation path.

    Hope this helps!!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans