Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
message box,need to put code in fn library
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
i was trying to close the message box but there are so many...i want to use function library ,how to proceed..
i used below code for one msg box and tried

Code:
Dim message
message= "information:"
Set oShell = CreateObject("WScript.Shell")
oShell.Popup message,15, "Title"

how to put this in fn libraray and call the function please let me know
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi Diya,

please go through the below link.

https://www.learnqtp.com/forums/Thread-h...gbox-popup

Regards,
Ankesh
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
hello ankesh,

i went thru the link but its using for loop

I have in many places the msgbox so wanted to put the code in function library and call it where necessary..

how do i do that....please help



hello ankesh,

i went thru the link but its using for loop

I have in many places the msgbox so wanted to put the code in function library and call it where necessary..

how do i do that....please help
Reply
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
Hey Diya,

Just remove the for loop and use the code. It will work.

Regards,
Ankesh
Reply
#5
Solved: 11 Years, 4 Months, 3 Weeks ago
Code:
Function messagebox()
Set a=createobject("wscript.shell") 'Creat one object
msgbox_message="Your Text"
msgbox_time=5
msgbox_title=""
a.popup msgbox_message,msgbox_time,msgbox_title

Set a=Nothing
end function

call messagebox

Not able to get.....associated the fn library using File->setting->resources->associate



Code:
Function messagebox()
Set a=createobject("wscript.shell") 'Creat one object
msgbox_message="Your Text"
msgbox_time=5
msgbox_title=""
a.popup msgbox_message,msgbox_time,msgbox_title

Set a=Nothing
end function

call messagebox

Not able to get.....associated the fn library using File->setting->resources->associate
Reply
#6
Solved: 11 Years, 4 Months, 3 Weeks ago
Diya,

the above function will create a msgbox and display till the time limit.

I guess you are trying to do something else. Please give a brief info.
Reply
#7
Solved: 11 Years, 4 Months, 3 Weeks ago
yuppy it worked.....sorry my mistake
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help for instruction to click on Skip button in the warning message vijilesh 0 1,556 09-16-2018, 03:48 PM
Last Post: vijilesh
  Using QTP features in Function library TurtleRock 0 1,756 01-30-2014, 06:02 PM
Last Post: TurtleRock
  recovery scenario for closing a message box itself ashima 0 2,249 12-26-2013, 11:10 AM
Last Post: ashima
  QTP is not recognizing Function Library Path associated to the test AshokReddy 2 4,134 12-19-2013, 01:59 PM
Last Post: AshokReddy
  Accessing Environment variable value in Library file vishruth143 1 2,588 09-07-2013, 05:11 AM
Last Post: jacosta

Forum Jump:


Users browsing this thread: 1 Guest(s)