Micro Focus QTP (UFT) Forums
Posting MsgBox message durring run - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Posting MsgBox message durring run (/Thread-Posting-MsgBox-message-durring-run)



Posting MsgBox message durring run - mv8167 - 12-01-2011

Is there a way to post a MsgBox message durring a run but keep going automatically after 1 second or so.

Currently, if a MsgBox displays,the user must press Ok to continue the automated script.

thx


RE: Posting MsgBox message durring run - vIns - 12-01-2011

Hi...
Plz try this...here 2 - seconds to wait.


ShowMyMessage "hi"


Code:
Sub ShowMyMessage(strMessage)
        CreateObject("wscript.shell").Popup strMessage, 2, "Title"
End Sub



RE: Posting MsgBox message durring run - Ankesh - 12-01-2011

Hi Lorena,

Plz chk the link https://www.learnqtp.com/forums/Thread-how-can-i-automatically-click-ok-button-in-msgbox-popup

I hope this would help.

Regards,
Ankesh


RE: Posting MsgBox message durring run - mv8167 - 12-02-2011

Thx vIns and Ankesh

I had searched but I did not search on the correct keywords. Thx for sharring these ideas. Both of your ideas are perfect. Thx guys!.

I then tried a mix of both ideas with sending 3 variables
ShowMyMessage (GroupName, 2, "Group Name")

with the Sub being:
Code:
Sub ShowMyMessage(msgbox_message, msgbox_time, msgbox_title)

Set a=createobject("wscript.shell") 'Creat one object
a.popup msgbox_message,msgbox_time,msgbox_title
Set a=Nothing    
End Sub

This was not liked. Can I do this? If so, how can I fix it?

thx


RE: Posting MsgBox message durring run - mv8167 - 12-03-2011

Never mind... lol...lol...lol

I forgot to "Call" my Sub function ;-). Its Friday!