Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HTML Command in macro?
#1
Hi guys...ive been away a while now im back needing your help Smile Is it possible to have a dialog load a html source code.......i want to incorporate paypal buy now buttons feature in to the dialog without actually having to load a website...is this possible?

basicly a dialog with buttons that will load the payment pages?

so instead of my clients loggin on to the site to pay all the time they can pay offline from an exe macro...
heres an example of the html code i need to load ......

<form target="PayPal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="My PAYPAL eMAIL">
<input type="hidden" name="item_name" value="PRODUCT 1">
<input type="hidden" name="item_number" value="">
<input type="hidden" name="amount" value="4.99">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="shipping" value="0">
<input type="hidden" name="shipping2" value="0">
<input type="hidden" name="handling" value="0">
<input type="hidden" name="image_url" value="">
<input type="hidden" name="return" value="">
<input type="hidden" name="cancel_return" value="">
<input type="hidden" name="undefined_quantity" value="0">
<input type="hidden" name="receiver_email" value="MY PAYPAL eMAIL">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="no_note" value="0">
<input type="image" name="submit" src="http://images.paypal.com/images/x-click-butcc.gif" alt="Make payments with PayPal, it's fast, free, and secure!">
</form>



feedback guys?

Thanks
#2
hmmm thinking about it....wouldit be easier to use the web browser sample and have it load an offline html file with the buttons on instead of trying to incorparate them into an actual dialog? im stumped :?

that sounds easier but the dialog will look better if its possible...
VεRiTλS
#3
Function Dialog42
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3"
str ax3SHD

_s=
;<html>
;<style> BODY { border: 0px; margin: 0px 0px 0px 0px; overflow: auto; background-color: #%02x%02x%02x; } </style>
;<body>
;<form target="PayPal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
;<input type="hidden" name="cmd" value="_xclick">
;<input type="hidden" name="business" value="My PAYPAL eMAIL">
;<input type="hidden" name="item_name" value="PRODUCT 1">
;<input type="hidden" name="item_number" value="">
;<input type="hidden" name="amount" value="4.99">
;<input type="hidden" name="currency_code" value="GBP">
;<input type="hidden" name="shipping" value="0">
;<input type="hidden" name="shipping2" value="0">
;<input type="hidden" name="handling" value="0">
;<input type="hidden" name="image_url" value="">
;<input type="hidden" name="return" value="">
;<input type="hidden" name="cancel_return" value="">
;<input type="hidden" name="undefined_quantity" value="0">
;<input type="hidden" name="receiver_email" value="MY PAYPAL eMAIL">
;<input type="hidden" name="no_shipping" value="1">
;<input type="hidden" name="no_note" value="0">
;<input type="image" name="submit" src="http://images.paypal.com/images/x-click-butcc.gif" alt="Make payments with PayPal, it's fast, free, and secure!">
;</form>
;</body>
;</html>

int R G B; ColorToRGB GetSysColor(COLOR_BTNFACE) R G B; ax3SHD.format(_s R G B)

if(!ShowDialog("Dialog42" &Dialog42 &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 172 105 "Dialog"
;3 ActiveX 0x54030000 0x0 62 32 54 32 "SHDocVw.WebBrowser"
;1 Button 0x54030001 0x0 40 88 48 14 "OK"
;2 Button 0x54030000 0x0 92 88 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x203000E "*" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#4
Thanks Gintaras your a legend. I was trying to do it all night through the sample browser you have in the archives tried to tweek it, But have it load an htm/html offline but it loaded the internet and the html file at the same time so this is top notch compared to my attempt :lol: . Atleast i wont be up till 6am trying to work it out like last night :oops: Now i can use this example and build from there....Thanks
VεRiTλS


Forum Jump:


Users browsing this thread: 2 Guest(s)