File upload Iteration using AutoIT and Katalon - autoit

I have a .csv file with locations on the HDD of 840 *pdf's, *.docx etc that I need to upload through our Web interface.
The web interface then opens up a Windows native window to go and select the file.
I am using Katalon studio and AutoIT. I have tried many ways and succeeded in some way where it will run but not iterate over the csv but keeps uploading the same one pdf.
Has anybody done something like this where you iterate through a csv, uploading files using AutoIT and Katalon?
I have succeeded by selecting a file and uploading it but it doesnt want to iterate either a test suite etc...
I have this on the Katalon side at the moment:
Thread.sleep(1000)
autoit_prj = 'C:\insertVariableExplorerWindow.exe "C:\#1151182.pdf"'
//autoit_prj = findTestData('filename').getValue('filelocation', 1)
Runtime.getRuntime().exec(autoit_prj)
And this on the AutoIT side:
ControlSetText("","","",$CmdLine[1])
Send("{ENTER}")
Any help would be appreciated
Regards
Hendri

Related

Azure Databricks: How do we access R Scripts present on DBFS?

I'm new to DataBricks. I am trying to access a .R file that is present in the DBFS storage but I cannot figure out how to do so. Any help is really appreciated.
I can read data from the storage using the file path /dbfs and also source code from the script but I want to make edits to the script.
You need some editor to do that - for example, you can setup RStudio on your cluster and connect to it via RStudio UI - in this case you can edit R files directly on DBFS.
But really, the simplest for you would be to use Databricks CLI fs command to copy the file to your local machine, make changes in the editor of your choice, and upload file back.

How to use the Desktop App converter (Desktop Bridge)

Just started on the process of converting my app to the windows store.
Having some hard time trying to figure out how to use the desktop app converter when the program comes in a zip package with additional files that needs to be included (Not just the EXE)
What i mean is typically speaking the users would download the zip file from the website and then extract it and run the EXE file. However in that zip file there's things like Drivers and Languages, I suppose i can make an MSI but i wanted to see if this was possible.
Anyone knows a way to just convert the ZIP file using the desktop app converter?
Thank you!
The Desktop App Converter has an option to create a Windows App Package (.appx) from a regular folder. So you just need to unzip your ZIP file and point the DAC at the folder, specifying what EXE should be the entry point: https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-run-desktop-app-converter#no-installer-conversion - note however, that you can't deploy drivers with a Windows App Package (.appx).

Can you create a batch file in asp.net?

Can you write code to create multiple batch files in asp.net? Can you create it and also have the code write batch file commands into the batch files? What I want to do is create .bat files in a certain location on the computer (or make it create a folder to put the .bat files into) on a button click and have it write all the commands into the .bat file. For example, I have a web form the user inputs data, pushes a button and based off the .bat files it creates, it creates a new batch file every time the button is clicked. Is this possible?
Yes, it is, but it could have a lot of security consequences, so, be careful.
You create a file using methods in the File class, like File.CreateText.
http://msdn.microsoft.com/en-us/library/system.io.file.createtext.aspx
Yes, this is possible but in general, you will only be able to create these files inside your application's folder.
If you need to create the files outside your application's folder, you need to make sure that the App Pool your app runs under, has permissions to write to that folder.
Since batch files are basically executables, I'd be very careful about using them and I would never, under any circumstance take free user input to be placed into those files. You may give the user a set of predefined "commands" to chose from to mitigate your exposure, for example.

Open a file in a temp directory in Max/MSP standalone

I have a Max/MSP standalone that looks for an external folder when it opens (it contains JSON files generated by R), which it does with loadbang -> prefix ~/folder_name.
This works OK, but I don't want to store the folder in home.
What I really want is to use Terminal to tell my standalone where to look, something like:
open -a standalone.app /var/folders/whatevercrazytempdirname/folder_name
But this doesn't work. Maybe I could establish a pipe between the program that generates the folder (R) and my standalone, but I don't know that this is possible with a Max/MSP standalone, and I haven't been able to find anyone who has done this.
Thanks for any suggestions!
I don't think there is a way to acquire runtime arguments in a Max standalone.
Perhaps you can have R write a text file to a standard directory (for example ~/Library/Application Support/MaxAppName/) that contains the whatevercrazytempdir path? The Max app could take it form there..
Alternatively, if R were to support udp networking, you could send Max an OSC message with the path.

How to open infopath templates in code and change data connections URL

I need to iterate through infopath templates (xsn files) and change the URL of data connections, and then save the changes to the templates.
The data connections I want to change, points to lists in a sharepoint environment.
So, how could I accomplish this task?
I was thinking doing this with a console application.
Infopath definitely doesn't make it easy to deploy to different servers. I have used a powershell script but you can use any console app or scripting language.
Steps to follow:
1. Extract the files from the XSN (either use extrac32 util from MS or rename to zip and use any zip library)
2. Change the data connection (string replace) in manifest.xsf, template.xml, and sampledata.xml
3. Repackage the files into the XSN (either use cabarc util from MS or zip and rename)
It is a pain to have to do all that but the entire script is less than a page long and runs pretty fast. One caveat I ran into was I needed a delay between steps 1 and 2 - the files weren't actually finished extracting and my script was trying to change them.

Resources