News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Using button click or javascript in the web address

Started by kesmezar, April 23, 2020, 10:56:26 PM

Previous topic - Next topic

kesmezar

Hi,

directive         db "open", 0
adress db "http://.........../forum/",0

.if eax == link
invoke ShellExecute,hWin,ADDR directive,ADDR adress,NULL,NULL,0
ret
.endif


The website is opened with these codes. Is it possible to click on a button (like, quote ...) on the site?

jj2007

You can try sending or posting a WM_LBUTTONDOWN to the browser, but I doubt it will work.

kesmezar

Thank you. I tried the examples in the archive.
I just write it for trial purposes ,for example ;

http://masm32.com/board/index.php?action=post;topic=8490.0;last_msg=92898

I was able to run this example because my session information is saved in the default browser.

<input type="submit" value="Post" tabindex="3" onclick="return submitThisOnce(this);" accesskey="s" class="button_submit">


Button click will not work as you say.If I can integrate this code, maybe I can present and run html form codes like web addresses.

hutch--

The ShellExecute() should be able to open the default browser at the URL you attach to it but it will depend on a number of settings in your OS version. On my Win7 64 box I have done OS settings to prevent apps from calling internet locations and while it is inconvenient in some cases, it stops the risk of rogue apps getting access to malicious code.

kesmezar

Thanks @hutch-- . My goal was to add useful posts to the forums, a thank you and reputation button for the programs. In general, it will be a forum tool. However, I can't ignore the possibility that this could pose a security issue and it won't work.