Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Expand variable

$
0
0
Hi,  Greetings to all forum members

 

 
I'd like to get text from clipboard and send it as parameter of a windows program.
The program is fart.exe, a command line utility to replace text inside files.
The text from clipboard is taken trough 
findstr .. D:\dati.txt |clip
 
I wrote two scripts, but they don't work
Opt("ExpandVarStrings", 1) #include <Process.au3> Local $bak = ClipGet() Local $rc = _RunDos("fart -q -i D:\m.reg $bak D:")
Opt("ExpandVarStrings", 1) Local $bak = ClipGet() Run(@ComSpec & " /c " & 'fart D:\m.reg $bak D:', "", @SW_HIDE)
 
 
But $bak variable is treated literally, is not expanded

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>