Scrolling to top of Page?

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
viking
Posts: 243
Joined: Sun Mar 16, 2008 7:22 am

Scrolling to top of Page?

Post by viking » Mon Jul 20, 2020 1:15 am

In the "good old" iMacros, I could use:

Code: Select all

EVENT TYPE=KEYPRESS SELECTOR=* KEY=36
to scroll to the top of the page. However, EVENT commands are no longer supported.

Is there some other way now to scroll to the top of the page?


Firefox 78.0.2 (64-bit)
iMacros 10.0.2.1450
Win7 (64-bit)
chivracq
Posts: 9430
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Scrolling to top of Page?

Post by chivracq » Mon Jul 20, 2020 2:06 am

viking wrote:
Mon Jul 20, 2020 1:15 am
In the "good old" iMacros, I could use:

Code: Select all

EVENT TYPE=KEYPRESS SELECTOR=* KEY=36
to scroll to the top of the page. However, EVENT commands are no longer supported.

Is there some other way now to scroll to the top of the page?

Code: Select all

Firefox 78.0.2 (64-bit)
iMacros 10.0.2.1450
Win7 (64-bit)

'Free'/'PE' is missing from your FCI about v10.0.2 for FF...

Thread is not "really-really" specific to FF..., once upon a time and for several years, the 'EVENT' Mode was only supported/implemented on FF, then other Browsers joined, and now v10.0.2 for FF is the only Version not supporting the 'EVENT' Mode, and hopefully a future Version of iMacros for FF will support that Mode again...

>>>

But anyway..., yep, you can use the "Standard" JS Method:

Code: Select all

URL GOTO=javascript:window.scrollBy(0,-50000)
(Tested on iMacros for FF v8.8.2, PM v26.3.3, Win10_x64.)

Adjust the '-50000' to the Value that you want, '-50000' is already good for 50 (Vertical) Screens [1280x1024]...

>>>

And there is probably a 'scrollTo()' Solution also... :idea:
Oh...!, then yep, 'scrollTo()' also takes Coordinates, I thought it only accepted Objects, then it's even easier in your Case than with with 'scrollBy()', ah-ah...!: 8)

Code: Select all

URL GOTO=javascript:window.scrollTo(0,0)
(Tested on iMacros for FF v8.8.2, PM v26.3.3, Win10_x64.)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
viking
Posts: 243
Joined: Sun Mar 16, 2008 7:22 am

Re: Scrolling to top of Page?

Post by viking » Mon Jul 20, 2020 8:59 am

Thanks as always chivracq!
Both commands work (I didn't realize that javascript still works).

p.s. I posted this in the FF forum since I need to use it with FF78 (because it supports containers). What is 'Free'/'PE' ?
chivracq
Posts: 9430
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Scrolling to top of Page?

Post by chivracq » Mon Jul 20, 2020 1:22 pm

viking wrote:
Mon Jul 20, 2020 8:59 am
Thanks as always chivracq!
Both commands work (I didn't realize that javascript still works).

p.s. I posted this in the FF forum since I need to use it with FF78 (because it supports containers). What is 'Free'/'PE' ?

OK, good to hear that it works in v10.0.2 + FF78, I wasn't completely-completely sure either, and I was too "lazy" to test, as I "only" have some "older" v10.0.2 + FF61 or FF62 Environment, I think :oops: , still from the Beta Testing Phase, 2 Years ago, that I very-very rarely use, as I also use v8.9.7 + FF55, but both FF Versions don't "want" to run at the same time, so it's always a bit of a hassle when I want to test stg in v10.0.2 for FF ('Free')... And I think I had left FF62 to "Auto-Update", but Updating/Downloading is always a bit of a hassle for me also as I have a very slow Internet Connection and simply updating FF would already take a few Hours, with probably a few "Fail" in the "Process"... (Hum, maybe an Idea to use a Virtual Desktop (Win10) for that, ah-ah...!)

So yep, the 'URL GOTO=javascript' Syntax still works in v10.0.2 for FF, it's the 'imacros://run/?m=' Syntax which is not supported anymore in v10.0.2 for FF, both from 'CLI' ('Command Line Interface') or from 'URL GOTO'...

>>>

Well, about 'Free'/'PE', v10.0.2 for FF (same for v10.0.5 for CR) now comes in 2 "Flavours", one "Limited" 'Free' Version and one "Full"/"Paid" 'PE' Version (= "Personal Edition"), with several Commands/Functionality not supported in the 'Free' Version: Local File Access (needed for '!DATASOURCE' + 'SAVEAS TYPE=EXTRACT' + 'SCREENSHOT'...), User-Defined Vars and only '!VAR[1-3]', the 'Profiler', only ('.iim') Scripts as Bookmarks, Scripts up to Max=50 Lines, Looping up to Max=100 Loops, etc...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
viking
Posts: 243
Joined: Sun Mar 16, 2008 7:22 am

Re: Scrolling to top of Page?

Post by viking » Mon Jul 20, 2020 5:25 pm

chivracq wrote:
Mon Jul 20, 2020 1:22 pm
OK, good to hear that it works in v10.0.2 + FF78, I wasn't completely-completely sure either, and I was too "lazy" to test, as I "only" have some "older" v10.0.2 + FF61 or FF62 Environment, I think :oops: , still from the Beta Testing Phase, 2 Years ago, that I very-very rarely use, as I also use v8.9.7 + FF55, but both FF Versions don't "want" to run at the same time, so it's always a bit of a hassle when I want to test stg in v10.0.2 for FF ('Free')...
In my case, I can run FF55 and FF78 at the same time if I start FF55 first and then FF78. However, if I start FF78 first and then FF55, I get a message to close FF78 before starting FF55..
chivracq
Posts: 9430
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Scrolling to top of Page?

Post by chivracq » Tue Jul 21, 2020 4:34 am

viking wrote:
Mon Jul 20, 2020 5:25 pm
chivracq wrote:
Mon Jul 20, 2020 1:22 pm
OK, good to hear that it works in v10.0.2 + FF78, I wasn't completely-completely sure either, and I was too "lazy" to test, as I "only" have some "older" v10.0.2 + FF61 or FF62 Environment, I think :oops: , still from the Beta Testing Phase, 2 Years ago, that I very-very rarely use, as I also use v8.9.7 + FF55, but both FF Versions don't "want" to run at the same time, so it's always a bit of a hassle when I want to test stg in v10.0.2 for FF ('Free')...
In my case, I can run FF55 and FF78 at the same time if I start FF55 first and then FF78. However, if I start FF78 first and then FF55, I get a message to close FF78 before starting FF55..

Oh...!?, good to hear, then I'll need to do a bit more Testing, because "for me", with FF55 already running, when I try to launch FF62 (not sure which Version), I get directly some "Another instance of Firefox is already running... Please close... [etc]..."

And I wasn't sure but I apparently use the 'Portable' Version...:

Code: Select all

C:\Users\JFC\Downloads\Web\FirefoxPortable\FirefoxPortable.exe -no-remote
(But I can't launch it, so I cannot check which Version I'm running... But I'll try to update it to FF78...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
viking
Posts: 243
Joined: Sun Mar 16, 2008 7:22 am

Re: Scrolling to top of Page?

Post by viking » Tue Jul 21, 2020 6:02 am

To be more specific:
I can use old and new (Firefox 78.0.2 regular install (64-bit)) at the same time if I first launch either of:
Firefox Developer 55.0b2 Portable (64-bit)
or
Firefox ESR 52.8.1 Portable (64-bit)
chivracq
Posts: 9430
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Scrolling to top of Page?

Post by chivracq » Tue Jul 21, 2020 10:51 pm

viking wrote:
Tue Jul 21, 2020 6:02 am
To be more specific:
I can use old and new (Firefox 78.0.2 regular install (64-bit)) at the same time if I first launch either of:
Firefox Developer 55.0b2 Portable (64-bit)
or
Firefox ESR 52.8.1 Portable (64-bit)

Alright, this is "Interesting", ah-ah...!
What seems to "work" is to first launch FF Portable, and then FF "Standard" afterwards...
And indeed, that also works for me if I first launch my FF Portable which seems to be v72.0.1 Portable actually (and wants to update itself to some v72.0.2 Portable Version, I'm "surprised" it doesn't want to update to some v78 Portable Version, I didn't let it update), and only after, then I can start my FF v55.0.3 "Standard". That works indeed...

Well, "that works", hum..., I was not really "amused", because the first time I started FF55 while FF72 Portable was already running, FF55 "kind of started" but didn't load "completely", I could see and open the Menus but 'Help About' for example wouldn't do anything, nor could I open the iMacros Side Panel from the iMacros Icon, and the whole FF 55 Window/Instance was not really "responsive", and I couldn't even just close it, I had to kill it from the Task Manager... Hum, OK...
The 2nd time I tried to start FF55 again, this time it worked, BUT...!, ... it then had lost and forgotten all my Open Tabs, grrr...! :shock: :(

I rarely "need" that FF Portable Version with iMacros for FF v10.0.2 'Free', and it wouldn't be "a big deal" to then first close FF55 for a few Seconds to let FF72 Portable open first before relaunching FF55, but I guess I will be pretty reluctant to take the risk to lose again all my Open Tabs in FF55, ah-ah...!

Stg that maybe also works is to have both FF Versions in their corresponding Portable Versions... :idea:
(I didn't try... Downloading FF55 Portable would already be a bit difficult for me, and I would need to re-import my 3 FF55 Profiles and reinstall all their respective Add-ons, for which many are probably very difficult to find now, as they are not in the Mozilla Add-on Archive anymore...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
viking
Posts: 243
Joined: Sun Mar 16, 2008 7:22 am

Re: Scrolling to top of Page?

Post by viking » Tue Jul 21, 2020 11:05 pm

chivracq wrote:
Tue Jul 21, 2020 10:51 pm
(I didn't try... Downloading FF55 Portable would already be a bit difficult for me, and I would need to re-import my 3 FF55 Profiles and reinstall all their respective Add-ons, for which many are probably very difficult to find now, as they are not in the Mozilla Add-on Archive anymore...)
You can just copy over the whole profile folder, containing all the extensions etc, from one browser to another.
Also, there is an extension that lets you access an archive with legacy extensions:
https://github.com/JustOff/ca-archive/r ... /tag/2.0.2
Post Reply