Re: Paste from clipboard
Posted: Thu Apr 09, 2015 7:56 pm
Personally i use .vbs script
. It is another approach, really slower than ruby version, but it does the job!
The process in schematic is
1-Save .vbs* script in temp folder (textsave component)
2-Save .batch* script and execute to execute .vbs "Clipboard to .txt file"
3-read the .txt* with Flowstone (textread component)
4-Save .batch* script and execute to delete all temp files (bat vbs txt) (textsave component + ShellExecute Component)
*these are stocked and/or generated as text inside the schematic.
This take less than 1 second to do all the process...
You can allso copy text/string to clipboard and this just with ONE batch script (generated>saved>executed inside schematic) .
Ruby solution is better i think
.
Code: Select all
Set objHTML = CreateObject("htmlfile")
ClipboardText = objHTML.ParentWindow.ClipboardData.GetData("text")
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("C:\Windows\Temp\pfcboard.txt", ForWriting, True)
f.Write ClipboardText
f.Close
The process in schematic is
1-Save .vbs* script in temp folder (textsave component)
2-Save .batch* script and execute to execute .vbs "Clipboard to .txt file"
3-read the .txt* with Flowstone (textread component)
4-Save .batch* script and execute to delete all temp files (bat vbs txt) (textsave component + ShellExecute Component)
*these are stocked and/or generated as text inside the schematic.
This take less than 1 second to do all the process...
You can allso copy text/string to clipboard and this just with ONE batch script (generated>saved>executed inside schematic) .
Ruby solution is better i think