VB script to open .exe file and perform 4 activities - vbscript

I have a tool based on .net. I need a vb script which would open this tool (.exe file) and then select 3 radio buttons, click on a button to browse a xml file stored in same folder and then click on invoke button. Is this possible? I am a complete fresher and just have this idea in mind for an automation. This is required as I have to perform the same steps daily.
I could find this code:
CreateObject("WScript.Shell").Run("""C:\Users\abc\Desktop\folder\Tool.exe""")
Which is doing my task to open the .exe file perfectly. Can someone help/guide me in achieving the further steps?

You might be better off making your tool work via the command line and having it accept arguments.
That way, you could use a .bat file to call your 'tool' passing in the arguments it needs and away you go.
These should get you started on your quest.
Creating a HelloWorld Console Application Using VisualBasic.NET
How to Parse Command Line Parameters?
What is a bat file

Related

A question about Power Automate to proceed macro from another excel file

Hello I am a newbie that working on a project that requires to use Power automate desktop to analyze data in the excel worksheet. The project needs me to download a excel file from website and proceed with macro. Now I am able to download file from website and macro script has been tested without problem. So here comes the problem, I couldn't figure out how to use power automate to run macro from another excel file.
So let's say there are two excel file a.xlsm and b.xlsm and both store in download folder. The a.xlsm will always been the download file from website and b.xlsm will be the file that I already store the macro. I need to open a.xlsm and run the macro store in b.xlsm. Thanks for any suggestion in advance.
Ok I figure it out, here is the step you may follow.
Record Macro
Stop recording the Macro
Click Macros under developer section (or press Alt + F11)
Find the Module 1 under VBAProject (PERSONAL.XLSB (Default name))
Copy your finished script and paste into the module1
In the run excel macro function in Power Automate Desktop, put that code after Macro: 'PERSONAL.XLSB'!**** (**** will be the macro function you want to run)
note: please remember every time you want to run the macro you have to open the original worksheet which contains the macro, otherwise you won't be able to run it

open a text file via windows double click with ruby

I'm fairly new to Ruby, so please excuse me if my question is too basic...
I wrote a program that searches a text file for certain values.
The way it works is that when I run the program from command line it asks for the file to search through. So I drag the file over to the command window and press Enter. The program takes over and does what it's supposed to... I also created an exe file using Ocra just so I don't have to run it from command line.
It works great, but I want to take it a step further. How can I modify my program to be able to double click the text file in Windows and have my program automatically open and do it's search?

How to call a function when opening program from file?

I made a project in visual studio 2010 (maybe a bit outdated but I like it this way).
With that project I made a separate project that handles the setup file for the installation. In this setup project I assigned a file type to my project so that the program can be started by double-clicking the file.
Now all of this works, the file gets a icon similar to the program and when I double-click it, the program opens. The only problem is that it doesn't open the file that was clicked.
I think I need to change something in the 'command' that is seen in the file type properties. As it is, I just have it set to "Primary output form Project 1". How can I make it so that it doesn't just open the program, but also calls a function that loads the data inside the file?
I'm sorry if this question has been asked before. I searched for it but I couldn't find a similar question. I'm also pretty new to the whole programming thing.
Thank you in advance!
You want to pass the filename to your program as a command line argument.
Add %1 to the end of the command you have associated with the file extension.
For example: "C:\path\to\MyProgram" "%1"

autofilling a login box for an .exe program with shortcuts/scripts

I'm wondering if its possible to write a script or add a shortcut command or something to an .exe file that I open quite regularly and have to log on each time.
The program is called iMonitor which when you click on the .exe file opens up to a log in box with 3 fields, user name, password, and server. Is there some standard format or way anyone knows of to auto-fill those fields or would it be a program specific thing they would have to write into the code itself to allow?
Thanks in advance
Chuck

Alfred Action to open set of possible actions

I have custom Alfred workflow to File Filter some folders of my choice. I have two actions - to browse with Alfred, and, with CMD modifier, to open in Sublime.
I want to have an action where I may choose which program I want to open it in. I use 2-3 programs for basic editing, so I want to be able to select one of these.
Workflow would be:
start my workflow
enter few chars to find file
select a file with CMD
choose editor of choice from the list
How to implement the last thing? In other words, how to implement incremental actions e.g. "do this with this and then this".
There're two ways to do it.
Because you can choose which application will be used to open the file instead of the default one. A simple idea is using different keyword for each application. e.g. vim [file-name] for vim while sublime [file-name] for sublime.
Another way is using Run Script instead of Open File. An Apple script or Bash script can get the result in File Filter and open different application as you wish.

Resources