Without using openfiledialog - c#-3.0

I want to send files to my application without using openfiledialog....lost??
OK.
You select a file in my documents, in the SendTo menu, I want my application to be an option,
when you select my application, the file that was selected should be add to the list box in my application, the same way it would do if I was using openfiledialog. But I want my application to run in the background, which means I don't want to use openfiledialog.
Please help??
Using .NET 3.5

I believe this is what you are looking for. You do not need to write any code to get your app in the 'sendTo' menu. Just following the instructions here:
HowToGeek - Customize 'Send To' menu
once the files / references are being passed to your app, you will have to write code to handle those command line args

Related

Selecting a file from a windows dialog box in Telerik Web Test

Hi guys,
Is it possible to select a file from a dialog box when we are running a web test in Telerik Test Studio? The scenario of this execution is when we click a field in a web browser, a windows dialog box pops out and we would need to input a path to a local folder and select a file(SelectFile.PNG).
But I'm unable to detect any element from this dialog box presuming this is because the test script is a web test and hence this limitation(do correct me if i'm wrong).
Is there any workaround or suggestion to this limitation?
Many many thanks!
Best Regards,
Pravin
praja#dongenergy.dk
Kind of a late response but if your recording is enabled, it should automatically record the step for a File Upload dialog box (and handle it appropriately when using play back).
Alternatively, you can manually add the "Dialogs->FileUpload" step, and fill in the properties appropriately.

How to select a text from a web page and then copy paste it

I need to select some text from a web page and then copy it using Ctrl-C. I know I can use send keys for Ctrl-C but how do I select the text from web page? The requirement is that I don't just check the roproperty I need to select(highlight) the text on the web page.
The usual way to get text from a web page using UFT is not via CtrC but via UFT's built in methods.
Select a test object and use it's GetROProperty "innertext" function
Use an text (or text area) output value
As for clipboard, do you really need to put the text in the clipboard? Usually variables and output parameters are the way you want to go.
If you do want to interact with the system's clipboard you can use Mercury.Clipboard supplied by UFT
Set cb = CreateObject("Mercury.Clipboard")
cb.SetText "This is easier than Ctrl-C"

is it possible to replace a javascript file in the network or sources tab of chrome

If an webapp I am running did a GET on a javascript file but I wanted to intercept that GET and provide a different javascript file could I do that?
What would be the easiest method?
To give a frame of a reference I am writing a meteor application and the server database got torched. My only hope seems to be to take a cached version of the application.js and inject it because I believe mostly everything can be rebuilt from that.
You can edit the existing JavaScript code.
Not sure how to replace the JavaScript file.
Press F12 it bring the developer tools at bottom of your page .
Go to resource and select your JavaScript file
It will open inside editor(right side) there you can modify your script.

Display Message Box to copy code section from it using Powershell script

I am building install.ps1 script for Nuget pacakge and would like to open popup message at the end with some message , i have already achieved by following.
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[Windows.Forms.MessageBox]::Show("Test message ", "Test", [Windows.Forms.MessageBoxButtons]::OK, [Windows.Forms.MessageBoxIcon]::Information)
It will open popup message as per shown in below fig.
Instead of this i would like put some config code here that user can copy from box as per below fig
Please suggest me if anyone has done similar popup box before!
You won't be able to customize Windows.Forms.MessageBox to add what your looking for. In order to do what your looking for you'll need to create a custom form. An easy way of doing this is to use Primal Forms Community Edition which can be found here. You'll need to register for free to reach the download. There's a paid for version to so don't confuse that with the free CE edition. This tool gives you a Visual Studio like forms editor where you can drag and drop controls to a form and save the Powershell script. You'll need to create an event handler for the copy to text to clipboard button. After you saved the code generated by PrimalForms CE you will need to edit it to add the code for the event handlers. An example of how you can set the clip board with Powershell can be found here.
Users can copy the message box text simply by pressing the Ctrl+C key combination.

Web deployment tool

I would like to know if in IIS manager, when I export an application, there is a way to save components selected so, when I export next time, to select them by default (like appHostConfig). Thank you.
Unfortunately that is not possible today, if you are constantly using it you should consider using the command line instead that will easily allow you to save those in an external file and run them as frequently as needed without having to specify everything again.