Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
message box,need to put code in fn library
#1
Solved: 10 Years, 9 Months 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: 10 Years, 9 Months ago
Hi Diya,

please go through the below link.

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

Regards,
Ankesh
Reply
#3
Solved: 10 Years, 9 Months 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: 10 Years, 9 Months ago
Hey Diya,

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

Regards,
Ankesh
Reply
#5
Solved: 10 Years, 9 Months 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: 10 Years, 9 Months 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: 10 Years, 9 Months 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,364 09-16-2018, 03:48 PM
Last Post: vijilesh
  Using QTP features in Function library TurtleRock 0 1,650 01-30-2014, 06:02 PM
Last Post: TurtleRock
  recovery scenario for closing a message box itself ashima 0 2,129 12-26-2013, 11:10 AM
Last Post: ashima
  QTP is not recognizing Function Library Path associated to the test AshokReddy 2 3,956 12-19-2013, 01:59 PM
Last Post: AshokReddy
  Accessing Environment variable value in Library file vishruth143 1 2,476 09-07-2013, 05:11 AM
Last Post: jacosta

Forum Jump:


Users browsing this thread: 1 Guest(s)