Link to home
Start Free TrialLog in
Avatar of Saikumar Kolli
Saikumar Kolli

asked on

Auto click a Pop Up Button in Vb Script

Hi All,

I have a ".exe" file which need to be executed for every 3 hours.
So, i want to automate the process. while doing so i need to click a button through the VB Script.

After execution, the .exe file will display so many options.
Out of them, i need to click "Import" button, which will come after three tabs of opening the exe file.

Below is my code.

Set oShell = CreateObject("WScript.Shell")
      oShell.Run("C:\setup.exe")
      oShell.AppActivate ("C:\setup.exe")
      oShell.SendKeys "{tab}"
      oShell.SendKeys "{tab}"
      oShell.SendKeys "{tab}"
       oShell.SendKeys "{ENTER}"

I Am running the above script from the command prompt.
After the execution the script is opening the application, but staying there without doing any action.

Could any one please let me know, if there is any way to click the import button.
Thanks in advance.

Thank You.
Avatar of Kimputer
Kimputer

Better use AutoHotKey instead. It's more reliable with clicking specific things you need.
https://autohotkey.com/
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.