Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Capitalizing text string
#1
Hi, I'm new to QM, and wondering if there's a function for capitalizing a string of text?
Thanks in advance.
#2
Online help:
https://www.quickmacros.com/help/str/IDP_S_LCASE.html

Macro Macro4
Code:
Copy      Help
str s1 = "String"
s1.ucase
out s1 ;;STRING

str s2 = "sTrInG"
s2.ucase(0 1)
s2.lcase(1)
out s2 ;;String
#3
Thanks for the reply. I did see that in the help file, but I don't understand how to redirect the output to somewhere other than the QM window.
#4
outfile to desktop s1.txt
Macro Macro4
Code:
Copy      Help
str s1 = "String"
s1.ucase
out s1 ;;STRING
s1.setfile("$desktop$\s1.txt")
#5
Thanks so much for the guidance. Sorry if I'm not asking the proper questions.
What I'd like to get is the contents of the clipboard instead of "String"?
Is this possible?
#6
for the clipboard use getclip
Code:
Copy      Help
str s.getclip

read here for more info
getclip, setclip, getsel, setsel (quickmacros.com)
#7
Worked like a charm! Thanks so much.
Last question (I hope lol)
I see there's ucase and lcase. Is there a 'titlecase' also?
#8
see this post 

https://www.quickmacros.com/forum/showth...1#pid35311

also search the forum for ucase for more examples

Quick Macros Forum - Search Results


Forum Jump:


Users browsing this thread: 3 Guest(s)