The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

How to open page and view its source

Forums » General Opera topics » Customizing Opera

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

17. November 2011, 15:53:59

mochikun

Posts: 940

How to open page and view its source

I'm trying to create a shortcut for opening the menu.ini file in Opera's source editor.
Ideally the code would open the file directly in the editor, something like
View document source,"<filespec>"

but this is not possible, so I try to
1) open a tab with the file
2) open another tab with the source of the file
3) close the tab of step 1)
4) Make changes to the source and save

I'm stuck already with step 2):
Go to page ,"<filespec>"   & View document source

The new page with <filespec> opens, but I can't find a way to view the source of <filespec>. "View document source" always shows the source ot the document from which the shortcut was called, but not from the new active page containing the menu.ini file. Any ideas?

17. November 2011, 16:03:54

Moderator

Tamil

:-(|)

Posts: 115322

Go to page ,"<filespec>" & Delay, 100  & View document source

17. November 2011, 18:41:11

Pesala

Reclining Buddha

Posts: 27343

What I do is associate *.ini files with Notepad2 then add an item to my customised menu to open the configuration file. See Opera Menu.ini.

The help menu includes an option the check for updates, which downloads the latest version from my web site.

The Utilities menu includes items to edit the keyboard, menu, mouse gestures, and toolbars.

Item, "&Keyboard Edit"="Execute program, "O:\Opera 11.52\Profile\keyboard\Unicode.ini",,,"Spell Check""
Item, "&Menu Edit"="Execute program, "O:\Opera 11.52\Profile\menu\Opera Menu.ini",,,"Panel Notes""
Item, "Mouse &Gestures"="Execute program, "O:\Opera 11.52\Profile\mouse\modified_mouse.ini",,,"Wand""
Item, "&Toolbar Edit"="Execute program, "O:\Opera 11.52\Profile\toolbar\Compact.ini",,,"Set Label""


To update the edited menu while Opera is running, go to Options, Shortcuts, and Rename the menu. Don't actually rename it though — just click on OK. This will reload the edited ini file.
Skins Tips Buttons Backup Security User Scripts Language Forums
Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

18. November 2011, 07:54:01

mochikun

Posts: 940

Originally posted by Tamil:

Go to page ,"<filespec>" & Delay, 100  & View document source


Thanks!. It never occured to me that my computer could be too fast for Opera bigsmile

Originally posted by Pesala:

Don't actually rename it though — just click on OK


Nice!up Combining this with Tamil's 'Delay' trick I can put the update process into a shortcut:
Show preferences, 4 & Delay,200 & Go to end & Previous item & Rename menu setup & Delay,200 & Click default button & Click default button




18. November 2011, 09:47:06 (edited)

Pesala

Reclining Buddha

Posts: 27343

Try this: (See the first post in the Opera Buttons Thread for a full list of preferences buttons)
Show preferences,25 & Delay, 200 & Rename menu setup & Delay, 200 & Click default button & Click default button

I have adopted this method — its neater than the Notepad2 solution for other users as it doesn't require changing file associations. Updated Opera Menu.ini.

I already have a custom button on my source code editor to apply the changes and close the page:
[Source View Toolbar.content]
Button0, -1001150226=Save document
Button1, "Apply Changes"=Reload, , , "Apply Changes" & Delay, 500 & Close page

Apply
Skins Tips Buttons Backup Security User Scripts Language Forums
Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

18. November 2011, 11:29:57

mochikun

Posts: 940

Originally posted by Pesala:

Try this: (See the first post in the Opera Buttons Thread for a full list of preferences buttons)


I tried this list, which doesn't yet include Show preferences,25 . 24 doesn't work anymore, so I gave up...sad How nice it would be to have an up-to-date documentation of Opera's commands!

18. November 2011, 12:08:14

Pesala

Reclining Buddha

Posts: 27343

The idea behind using a Wiki was that it can be updated by anyone. In practice though, it rarely happens. That that list is called "AdvancedToolbarINIGuide for Opera 8.x/9.x" should have given you a clue just how old it was.
Skins Tips Buttons Backup Security User Scripts Language Forums
Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

18. November 2011, 14:24:51

mochikun

Posts: 940

Originally posted by Pesala:

That that list is called "AdvancedToolbarINIGuide for Opera 8.x/9.x" should have given you a clue just how old it was.


I noticed that "clue", but since just being old doesn't necessarily mean that the information is not valid anymore, I gave it a try.

Forums » General Opera topics » Customizing Opera