Page 1 of 1

how to code a button that saves websites browsing history in livecode

Posted: Wed Jun 03, 2020 7:39 am
by Lina
I need your help

I am programming a url browsing site when you long press on button named site01 it will enable you to type a url , and I need your help in how to script a button that saves the user's websites browsing history , and is there a way to know that the website url which the user has entered is active and correct , I am still a beginner

Re: the code for programming an add to favorites button and a websites browsing history

Posted: Wed Jun 03, 2020 9:17 am
by Klaus
Lina, this is the ANNOUNCEMENTS forum!? 8)
Will move this thread to the Beginners section.

Re: the code for programming an add to favorites button and a websites browsing history

Posted: Wed Jun 03, 2020 9:29 am
by Lina
LOL :)

Sorry

Re: how to code a button that saves websites browsing history in livecode

Posted: Wed Jun 03, 2020 12:07 pm
by sphere

Code: Select all

on enterInField
put the text into tVar
If tVar is not empty then
answer tVar titled "let me see what is in tVar"
open URL tVar
save tVar to a file or to a sqlite database
do other fun stuff
end if
end enterInField
something like that, put it in the script of the field to start with and experiment

Re: how to code a button that saves websites browsing history in livecode

Posted: Wed Jun 03, 2020 12:54 pm
by Lina
will try that
thanks a lot :)

Re: how to code a button that saves websites browsing history in livecode

Posted: Wed Jun 03, 2020 1:30 pm
by dunbarx
Perhaps this should have been a "mouseUp" handler in a button, as opposed to an "enterInField" handler, in, I suppose, a field?

Craig

Re: how to code a button that saves websites browsing history in livecode

Posted: Wed Jun 03, 2020 2:43 pm
by Lina
thank you :) craig

Re: how to code a button that saves websites browsing history in livecode

Posted: Wed Jun 03, 2020 6:14 pm
by sphere
dunbarx wrote:
Wed Jun 03, 2020 1:30 pm
Perhaps this should have been a "mouseUp" handler in a button, as opposed to an "enterInField" handler, in, I suppose, a field?

Craig
of course, that's also a possibility.
i don't have to tell you, but @Lina the enterInfield can also trigger the mouseUp --> focus on btn"dosomething" or send "mouseUp" to btn"dosomething". Many people hit the Enter or Return key after they write something in a field. For Return you need also an returnInfield handler, as enter and return are two different things.