Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i need help with window text
#1
Ok, I was not able to find where it helps me with this problem. i need a macro or function to look at a window text and if the window text changes it need to do an action. i've looked for this section on the forum but was unable o come up with an answer. if you can answer this problem or send me a link to where i can find the anser this would be appreciated.
#2
make a function
assign a trigger 2 the window u want 2 monitor and make the trigger name changed
then put in your code u want it 2 do after the window's text changes.
#3
Kevin Wrote:make a function
assign a trigger 2 the window u want 2 monitor and make the trigger name changed
then put in your code u want it 2 do after the window's text changes.

what do you mean assign a trigger to the window iwant to monitor? im kind of new to quickmacros.
#4
import my attachment and open notepad.
(press control p for macro properties)
type something and save.


Attached Files
.qml   guestman.qml (Size: 228 bytes / Downloads: 394)
pi
#5
ok i get what ur saying but its not quite what i need... what i need is a macro that basically a macro that gets the window text and whenever the window text changes it adds 1. like for example:

int i
str a.getwintext(win(notepad))
if(WindowTextChanges)
,i+1
,if i=20
,,clo "NotePad"

or sumthing like that. i know the if(WindowTextChanges isnt real but i need sumthign to fill in for that. if you can help plz do.
#6
ok.
so which's window text we are talking about ?
pi
#7
ok, i want to do this to be able to count how many files ive opened automatically by the name of the file. which means when i open notepad its gonna have a different title everytime. What i want it to do is when the title changes, to add 1 into the qmbox... I know how to do everything except the when the window text changes... only reason is because i dont have the notepad as the same title everytime i open it. therefore, i cant use a trigger like window name changed.
#8
U can still use the trigger u just have 2 change the trigger so it monitors all note pad windows.
Trigger window should look something like this

Code:
Copy      Help
!n"Notepad" "Notepad"
#9
ive tried that multiple times but it doesnt work... i need to use some type of code that registers when a text changes. like i need the macro to grab the window text and then from there on out whenever it changes to add 1.
#10
try this this works every time 4 me everytime
this goes in macro or function


Code:
Copy      Help
int+ x
x+1
out x
if x=20
,clo "Notepad"
now make the trigger select name changed
make sure it says just notepad
ex
window name Notepad
class notepad
click ok and it should work fine
#11
ok i got this all setup in a function. but id like to know is there any way to set this up i na macro without having a trigger like you would in a function? like in a funciton you have window name class etc. is there anyway to setup like you would that in a macro?
#12
what exactly are u trying 2 do that this wouldn't work 4 ya?


Forum Jump:


Users browsing this thread: 1 Guest(s)