createLow{ $_currentURL = $URL; #alert( $_currentURL ); $position=index( $_currentURL,"www.youtube."); if $position!=-1{ $nope=index( $_currentURL,"fmt=" ); if $nope==-1{ #alert( $_currentURL ); open( $_currentURL."&fmt=0" ); } } #end createLow } $OnLoad=$OnLoad."createLow;"; #_______________________________________ $macroModules=$macroModules."LowYoutube;";When the youtube page finish loading, re-loads with the fmt added in the url. It's to change the video quality. My code seems to work OK, but I need to modify the way it works, I would like to do not wait until it finishes loading, anybody knows of an event that could help me?
ID_NAV_STOP Stop loading.
Thanks JamesD. Do you know if there is a way to check the $URL in a loop, I mean without waiting for an specific event?Quote
JamesD
To stop page loading in a macro you can use this ID COMMAND.
ID_NAV_STOP Stop loading.
In the macro it would look like this.
id(ID_NAV_STOP);
I am not sure what you mean? Is the macro loading the URL into the tab or window, or do you call the macro from a menu? We have the OnLoad event but that is triggered when the loading is complete.Quote
mslayer
Do you know if there is a way to check the $URL in a loop, I mean without waiting for an specific event?
Sorry I wasn't clear, the OnLoad event works great (I'm using this method) but I need to wait for the page to load. Since I'm trying to modify the url, it would be cool to do not wait.Quote
JamesD
I am not sure what you mean? Is the macro loading the URL into the tab or window, or do you call the macro from a menu? We have the OnLoad event but that is triggered when the loading is complete.Quote
mslayer
Do you know if there is a way to check the $URL in a loop, I mean without waiting for an specific event?
I wanted to Stop the loading if the url wasn't modified, then modify it and finally re-load with the new url. Everything automatic, with no user interaction. But the problem is that $URL contains the url of the tab that you are viewing.Quote
JamesD
I am not sure if you want the macro to stop the loading or you want to stop the loading yoursefl after you see what kind of page is loading. On my Klassic skin tool bar the third button from the left will stop the loading of the page.
Is the loading of the page started from clicking on a link or some other method?