The MASM Forum

General => The Campus => Topic started by: kesmezar on April 23, 2020, 10:56:26 PM

Title: Using button click or javascript in the web address
Post by: kesmezar on April 23, 2020, 10:56:26 PM
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?
Title: Re: Using button click or javascript in the web address
Post by: jj2007 on April 23, 2020, 11:12:22 PM
You can try sending or posting a WM_LBUTTONDOWN to the browser, but I doubt it will work.
Title: Re: Using button click or javascript in the web address
Post by: kesmezar on April 24, 2020, 02:27:34 AM
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.
Title: Re: Using button click or javascript in the web address
Post by: hutch-- on April 24, 2020, 02:50:29 AM
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.
Title: Re: Using button click or javascript in the web address
Post by: kesmezar on April 24, 2020, 04:01:12 AM
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.