June 15, 2017 at 9:51 pm #360481
Lectora has a “Goto Web” action. Is it possible to construct the URL that is inserted there? I have tried to add a VAR(word) variable to the URL string e.g. http://dictionary.com/browse/VAR(dictionary_word). BUT it reads this as a literal and not a variable. I could write a little JS script but would, of course, prefer to use ready-made Lectora structures.
Any thoughts? Thanks!June 15, 2017 at 11:18 pm #360483
Yes you can.
Create a variable… you can construct that one anyway you want / need..
Say in the end that is… variable myURL = “http://mywebpage.com”
In the action ‘Go to WebAdress’ you add it like this: VAR(myURL)
MathThis post has received 3 votes up.June 16, 2017 at 8:43 am #360526
Darrel SomozaMember147 pts@Klaatu
To take this one step further lets say you made myURL = http://www.nbc.com. You can make another variable, we’ll call it subPage with a value of ‘/dateline’ (no quotes). When you go to modify the original URL with a modify variable action, the value you need is Var(myURL)Var(subPage). No spaces, no addition operator – just the variables adjacent to each other. Now when you open myURL it will open to http://www.nbc.com/dateline. I think this is what Math means when he says “Create a variable… you can construct that one anyway you want / need..”This post has received 4 votes up.June 16, 2017 at 9:47 am #360551
Great information from both of you, the most important being (for me) that you can use either a string literal in the URL or a Variable, but cannot mix them. That understanding solves a lot of problems/frustration. Thanks Math and Darrel!!June 17, 2017 at 2:47 am #360656
Now for the next exciting episode.
Is it possible to show TWO pages side by side? I have tried several settings but the best I have managed to achieve is that I can size an position the first page (theoretically) the second page but no matter what settings I use the second page just replaces the first page (if it gets that far – I can get it to do this if I insert a delay in the display of the second page).
Anyway, the idea is to display two dictionaries side by side: one English-English and the other English-Thai. Everything works perfectly in terms of word lookup etc but no way that I can find t show the two pages side by side.
AndrewJune 17, 2017 at 4:07 am #360658
Mmmmm… depends a bit what you see as a page…
Say you have a Lectora.awt of 1009×662 ( Lectora 16 )… page A with En_en dictionary, page B with En_Thai..
Only way i can think off to show both simulteanously is using external HTMLObject with 2 extHTMLs… 1 loading page A, one showing page B.
In Lectora 17 there might be an option to ‘abuse’ the ‘Seamless play’ options to show both. Cant think how now, but sure interesting to try.
~MathThis post has received 1 vote up.June 17, 2017 at 4:23 am #360662
Tim KMember209 pts@timk
If you just want a second window all you’ll have to do is use different “Window Names” for the two Go to actions in the New Window properties. Default is “Popup Window” for both, that’s why both are opened in the same window, i.e. the second replaces the first. Change one of them to open the two urls in different windows.This post has received 1 vote up.June 17, 2017 at 4:29 am #360664
Thank you Math and thank you Tim. I did not think of changing the second name – but I think you are right as that would explain why the second page finds itself inside the first page. I need to get used to giving names that are different for each object.June 17, 2017 at 4:39 am #360666
Yes … that was it – the name – I thought the name was just cosmetic, i.e. to help the lesson writer remember which was which – but it is not. I think it is referenced internally by Lectora’s JS – Thanks Tim. Saves a whole lot of trouble/time.June 17, 2017 at 6:04 am #360668
Ooooooooh just a popup 🙂 What’s in a name ;=)June 20, 2017 at 12:00 pm #361058
Jennifer ValleyModerator103 pts@jvalley4735
I love learning something new every day! Great thread 🙂
You must be logged in to reply to this topic.