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

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
Lina
Posts: 11
Joined: Fri May 01, 2020 12:52 pm

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

Post by Lina » Wed Jun 03, 2020 7:39 am

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
Last edited by Lina on Wed Jun 03, 2020 11:53 am, edited 2 times in total.

Klaus
Posts: 12204
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

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

Post by Klaus » Wed Jun 03, 2020 9:17 am

Lina, this is the ANNOUNCEMENTS forum!? 8)
Will move this thread to the Beginners section.

Lina
Posts: 11
Joined: Fri May 01, 2020 12:52 pm

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

Post by Lina » Wed Jun 03, 2020 9:29 am

LOL :)

Sorry

sphere
Posts: 1117
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

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

Post by sphere » Wed Jun 03, 2020 12:07 pm

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

Lina
Posts: 11
Joined: Fri May 01, 2020 12:52 pm

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

Post by Lina » Wed Jun 03, 2020 12:54 pm

will try that
thanks a lot :)

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7405
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

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

Post by dunbarx » 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

Lina
Posts: 11
Joined: Fri May 01, 2020 12:52 pm

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

Post by Lina » Wed Jun 03, 2020 2:43 pm

thank you :) craig

sphere
Posts: 1117
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

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

Post by sphere » Wed Jun 03, 2020 6:14 pm

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.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”