Jump to content

Recommended Posts

Posted

Simple (not for me..) question, how can I insert a standard paypal html donate button in my gui?

This is the code of the button (with a little tweak for the privacy):

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

<input type="hidden" name="cmd" value="_s-xclick">

<input type="hidden" name="hosted_button_id" value="xxxxxxxxxx">

<input type="image" src="https://www.paypal.com/it_IT/IT/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - Il sistema di pagamento online più facile e sicuro!">

<img alt="" border="0" src="https://www.paypal.com/it_IT/i/scr/pixel.gif" width="1" height="1">

</form>

Thanks!

Posted

$sTitle = "Test GUI"
GUICreate($sTitle)
$Menu_help = GUICtrlCreateMenu("&Help")
$Menu_Donate = GUICtrlCreateMenuItem("&Donate", $Menu_Help);; you can do the same with a button but the menu item is less obtrusive IMO.
GUISetState()
While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case -3
            Exit
        Case $Menu_Donate
            ShellExecute("http://dundats.mvps.org/donating.aspx?app=" & $sTitle)
            ;;The ?app= query string is only to make it more flexible for me.  If blank then it assumes donation to the website
    EndSwitch
WEnd

PayPal also has an upgrade (not free) that will allow you to place the code right in an application using their api.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Posted

Thanks for the answer but I wanted to place the paypal button in my gui, not in a website,

and if the user clicks on the button, he will go directly on my personal donation page. :)

Posted

Then read my comment in the last post.

Send Paypal some money for an account upgrade and they will take care of it for you. I've been down the road with them before on this very issue and that is why I opted for the web page method. You asked for some help with the problem, I gave you my experience and provided an optional way and I have no intention of getting into any further discussion with you about it. You have two clear choices. Take the free one or pay for the other, that choice is yours.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Posted

satanikut, did you even test the GEOSoft's script? or at least read it...

you can do the same with a button

Yes I read and tested it, why?

...and I have no intention of getting into any further discussion with you about it.

Man take a cup of camomile, did we have some discussion?

I said thanks to your answer, and I asked if was possible doing the button with the other method, nothing more.

I'll do it using your example script, thanks again.

  • 2 weeks later...
Posted (edited)

just replace <PUTBUTTONIDHERE> with your real buttonID

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("PayMeNow", 463, 153, 192, 114)
$btnPayMe = GUICtrlCreateButton("Pay Me Now", 168, 48, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $btnPayMe
            ShellExecute("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&currency_code=USD&hosted_button_id=<PUTBUTTONIDHERE>");

    EndSwitch
WEnd
Edited by tobject

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...