I am trying to write a seemingly simple script that will copy
selected text and change it to Title case and repaste it back to the
source. For some reason the following script does not work as I
expected. When I run it, it appears to not do anything with the
text. But, if I immediately rerun the same script, it will spit out
the text processed the way I want it. Why is this?
Script follows:
local txtclip txtresult
; Cut text to clipboard
clip.Cut
; Put clipboard contents into variable
txtclip = clip.get
; for testing
; win.debug(txtclip)
;
; Process and put into variable txtresult
txtresult = case("title", txtclip)
; Repaste back into application
clip.textpaste(txtresult)
For testing, I put a debug statement right after the line where I am
trying to put the clipboard contents into variable "txtclip". The
result always seemed to be one clip behind. In other words, if I ran
the script on 3 different samples, run #2 would spit out the text
copied in run #1 and run #3 would spit out the text copied in run #2.
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/