Capture a dynamic number in a window name

Advanced programming using WinTask scripting language

Capture a dynamic number in a window name

Postby Edwin on Thu Jun 26, 2014 9:50 am

I am a user of Wintask and I use it for software testing purposes. I faced an issue recently that held me up a lot searching for the solution but unfortunately I did not find in the Help option of Wintask.
The issue is I need to do Correlation for a dynamic value generated in an application.
When I try to detect a window, the name of the window contains a dynamic number that is like a session number, despite the application is not web based but the behaviour is like a web based app and each time that I start the application seems the sever send a unique Hex number per session that cause my script fail. Hence, I need somehow to capture that value dynamically and put it in a variable or parameter so that I can use it for next steps in my scripting.

Please guide me urgently if there is any solution in Wintask as I am really behind and need to figure out how to fix it very quickly
Posts: 11
Joined: Fri Sep 30, 2005 10:48 am

Re: Capture a dynamic number in a window name

Postby TechSupport on Mon Jun 30, 2014 9:10 am


A window name within a UseWindow can be truncated. For example in the window name you have:
and so the number after Afx: changes at each replay. You can truncate and keep only Afx:
Like that any window which class starts with Afx: will be found at replay.

WinTask TechSupport
Posts: 805
Joined: Thu Nov 16, 2006 9:58 am

Return to Scripts programming

Who is online

Users browsing this forum: No registered users and 1 guest