How to get powershell input as a variable in UiPath?


#1

I created a simple PowerShell script provide a pop-up which auto disappears in 10 sec. This script captures response as

Ok - 1
Cancle -2
and no response as - (-1)

I am able to run this script but not able to capture the value. Can someone please help me with capturing the value that powershell triggers? Attaching script and XAML - Remove .pdf to get the script filePowershell.ps1.pdf (413 Bytes)

Powershell.xaml (5.1 KB)


#2

have you tried this?

Regards…!!
Aksh


#3

So I am new to this Powershell! and I was not able to use this information. Can you please help?


#4

yes sure… but tell me in which part you are not getting? pal


#5

When I run this script in Powershell

$wshell = New-Object -ComObject Wscript.Shell

$wshell.Popup(“Do you want to e-file”,10,“Done”,0x1)

and Press ok, I get the value as “1”. Now I want to use this value in Uipath for the run some condition. For that, I need this value to be captured. How can I do that?

Hopefully, I am making some sense.


#6

Never mind! I solved this problem :slight_smile: ! thanks for all the help


#7

Hello MGDEL, please let us know how… :slight_smile:


#8

time out pop_up.zip (2.6 KB)

Please check these two files and let me know if you have any questions?


#9

Sorry pal @MGDEL

Was busy with some work stuff…But You have already done with it :slight_smile: :thumbsup:

Regards…!!
Aksh