How might I sort the clipboard contents and return the sorted result into the clipbord so I can then paste the result into an active document ?
________
OXYGEN VAPORIZER
sort clipboard
Moderators: Dorian (MJT support), JRL
- webber123456
- Newbie
- Posts: 11
- Joined: Thu Aug 04, 2005 10:06 pm
sort clipboard
Last edited by webber123456 on Thu Feb 10, 2011 9:37 pm, edited 1 time in total.
You could use a bubble sort algorithm or similar. Google "bubble sort".
MJT Net Support
[email protected]
[email protected]
Try something like this:
Hope this helps,
Dick
Edit-1
For some reason this would lock up occasionally. I removed the percents (%) from around the "tosort" variable in the second line and also from the "sorted" variable in the ninth line. It seems to function now without locking up.
Sorry if this inconvenienced anybody,
Dick
GCB>tosort
WriteLn>%TEMP_DIR%~tempsort~.txt,result,tosort
Let>RP_WAIT=1
Let>RP_WINDOWMODE=2
Run>cmd /c sort %TEMP_DIR%~tempsort~.txt /O %TEMP_DIR%~tempsorted~.txt
Let>RP_WAIT=0
Let>RP_WINDOWMODE=1
Readfile>%TEMP_DIR%~tempsorted~.txt,sorted
Put>sorted
DeleteFile>%TEMP_DIR%~tempsort~.txt
DeleteFile>%TEMP_DIR%~tempsorted~.txt
Hope this helps,
Dick
Edit-1
For some reason this would lock up occasionally. I removed the percents (%) from around the "tosort" variable in the second line and also from the "sorted" variable in the ninth line. It seems to function now without locking up.
Sorry if this inconvenienced anybody,
Dick