Register


Active : 1096
Logged in : 391
Time: 05:49 KST

User Streams
38 online (3 live)
Home | Forum | VODs | Liquibet | Fantasy | Blogs | Liquipedia | Articles | Store
Search TeamLiquid.net
Starcraft Progaming News
[OSL] Reach For The Stars
[TSL] Go Go Go!
[PL] Lim-Jin Rok
[TSL] Ladder with Legends
[OSL] The End of the Begi…
Featured Threads
Recommended VODs of rece…
TL User Locations
Small Vod Thread.
Funny Quotes from TL's I…
Team Liquid Manpower
General Forum
"Fall of the Republic"
Participants needed for …
Marijuana in American Cu…
Swine flu vaccine
Kpop discussion thread
Starcraft 2 Forum
Zerg spies?
StarCraft2.com updated!
Vote for SC2 in Spike's …
StarCraft II Q&A Batch 55
Data Editor: Mod Examples
Starcraft: Brood War Forum
What's up with Nada?
KeSPA Dream League
Post your cheese/rush/fu…
Help with weird iccup er…
[CSL+] News and Announce…
Starcraft Tournaments and Leagues
[SPL] STX Soul vs Samsun…
[R&S] Nate MSL (Nov '09 …
3v3 BGH Random Races Tou…
[SPL] SK Telecom T1 vs W…
[MSL] Group Selection
Starcraft Strategy Forum
[Q] ZvP response to 1gat…
Liquipedia.net
[H] TvP D-
[H] ZvP 2 gates on outsi…
Why does destination fav…
Sports & Games Forum
[HoN/DotA] Let's Play~!!
League of Legends
Battlefield Bad Company 2
NCAA Football 2009
NFL 2009!!!
Blogs
Starcraft Replays
KawaiiRice - MistrZZZ
By.FlaSh - Best[WHITE]
By.FlaSh - Tempest)Is(
Light[aLive] - By.hero
Bisu - HyuK


Website Feedback

Closed Threads

IRC Updated
irc.quakenet.org #teamliquid

IRC Web Client
New to Team Liquid? Register here!

[H] Desktop Hyperlinks

Forum index > Blogs
  Daigomi   South Africa. June 29 2008 07:27. Posts 2124Profile Blog 
Ok, so I'm using an html page as my background. The page looks like this:

[image loading]

The hyperlinks at the bottom of the page have been set up to do this:


<div id="links">
<div class="link"><a href="h:"></a></div>
<div class="link"><a href="c:"></a></div>
<div class="link"><a href="d:"></a></div>
<div class="link"><a href="g:"></a></div>
</div>


The problem with this is that Internet Explorer is not my default browser, so it opens it as some freaky window in Maxthon browser.

So I tried to make shortcuts to the drives, and have the hyperlinks lead to that, as in:


<div id="links">
<div class="link"><a href="C:\Pics\Photoshop\HTML\h.lnk"></a></div>
<div class="link"><a href="C:\Pics\Photoshop\HTML\c.lnk"></a></div>
<div class="link"><a href="C:\Pics\Photoshop\HTML\d.lnk"></a></div>
<div class="link"><a href="C:\Pics\Photoshop\HTML\g.lnk"></a></div>
</div>


But now it asks me to which location I want to download the files first. I'd like it if it would just open the link on standard (like it does with torrent files etc), but I can't seem to set that in the file types.

So, can anybody help me with this? I don't care how you manage to do it, I just want to be able to use hyperlinks on my desktop without installing some desktop enhancing software.
Last edit: 2008-06-29 07:31:50


Old Post

  Chuiu   June 29 2008 08:06. Posts 2630Profile Blog 
Well "file:///C:/" would be the proper way of doing it, but that would still open it in the browser and not explorer.exe.

The only way I could think of doing it is to somehow write some javascript code that opens "c:\windows\explorer.exe" with the argument "c:\" when you click on a certain link but my javascript is very rusty so I'm unsure of how to do this (or if you even can do this - maybe in java or php).
Old Post

  zdd   June 29 2008 09:31. Posts 1463Profile Blog 
script:


<script language="javascript">
function openLink() {
var shell = new ActiveXObject("WScript.shell");
if (shell)
{ shell.run("C:\\windows\\explorer.exe D:"); }
else
{ alert("Error"); }
}
</script>


to invoke:


<a href="#" onClick="openLink()">asdf</a>

Last edit: 2008-06-29 09:32:06
All you need in life is a strong will to succeed and unrelenting determination. If you meet these prerequisites, you can become anything you want with absolutely no luck, fortune or natural ability.
Old Post

  Daigomi   South Africa. June 29 2008 17:14. Posts 2124Profile Blog 
Thanks for the replys, I'm sorry I couldn't respond as I went to bed early last night with a cold.

zdd, the complete code looks like this at the moment:


<html>
<html>
<head>
<style>
body {
background-image: url(4.jpg);
}
#links {
margin-left: 1331px;
margin-top: 665px
}
.link {
margin-bottom: 6px;
}
.link a {
display: block;
width: 45px;
height: 45px;
}
</style><body>
</style></head>

<script language="javascript">
function openLink() {
var shell = new ActiveXObject("WScript.shell");
if (shell)
{ shell.run("C:\\windows\\explorer.exe D:"); }
else
{ alert("Error"); }
}
</script>

</head>
<body>
<div id="links">
<div class="link"><a href="C:\Pics\Photoshop\HTML\h.lnk"></a></div>
<div class="link"><a href="C:\Pics\Photoshop\HTML\c.lnk"></a></div>
<div class="link"><a href="#" onClick="openLink()"></a>
</div>
<div class="link"><a href="C:\Pics\Photoshop\HTML\g.lnk"></a></div>
</div>
</body>
</html>


Sorry if there are any mistakes, my knowledge of html coding is very very minimal. When I click on the link (3rd one, since the script only leads to d drive at the moment), it tells me active-x will be activated, and if I say yes, nothing seems to happen. Any idea how to make it not ask me about active-x constantly, and why nothing happens?
Old Post

  Daigomi   South Africa. June 29 2008 17:42. Posts 2124Profile Blog 
Also, the idea I'm playing with atm is to create a new file type (.ink), which will work in the same way as shortcuts (.lnk), but will be set up so that windows does not ask whether to download the file first. Now, I know how to create a shortcut, and I know how to stop windows from asking if you want to download the file, but when you create a shortcut then the "advanced" button doesn't exist.

I think this will be possible if I could somehow find a list of commands available for the "actions" menu, but I just can't seem to find such a list. I'm thinking that perhaps a command such as "browse" or "browse file location" or such a command could be used to make it work.
Old Post

  Daigomi   South Africa. June 29 2008 18:20. Posts 2124Profile Blog 
Actually, I think I've gotten this to work. Your script worked perfectly zdd, I was just being a retard (my explorer.exe is on my e: drive). To turn of the notifications, you just change the security settings for files on the "local intranet". So as things are at the moment, I can access my D drive like it is. I'm going to copy your script three times, give it a new name (openLink2 etc.), and hopefully that will work!

Thank you everybody!
Last edit: 2008-06-29 18:28:01
Old Post

  Daigomi   South Africa. June 29 2008 18:37. Posts 2124Profile Blog 
Final code:


<html>
<html>
<head>
<style>
body {
background-image: url(4.jpg);
}
#links {
margin-left: 1331px;
margin-top: 665px
}
.link {
margin-bottom: 6px;
}
.link a {
display: block;
width: 45px;
height: 45px;
}
</style><body>
</style></head>

<script language="javascript">
function openLinkC() {
var shell = new ActiveXObject("WScript.shell");
if (shell)
{ shell.run("E:\\windows\\explorer.exe C:"); }
else
{ alert("Error"); }
}
</script>

<script language="javascript">
function openLinkD() {
var shell = new ActiveXObject("WScript.shell");
if (shell)
{ shell.run("E:\\windows\\explorer.exe D:"); }
else
{ alert("Error"); }
}
</script>

<script language="javascript">
function openLinkG() {
var shell = new ActiveXObject("WScript.shell");
if (shell)
{ shell.run("E:\\windows\\explorer.exe G:"); }
else
{ alert("Error"); }
}
</script>

<script language="javascript">
function openLinkH() {
var shell = new ActiveXObject("WScript.shell");
if (shell)
{ shell.run("E:\\windows\\explorer.exe H:"); }
else
{ alert("Error"); }
}
</script>


</head>
<body>
<div id="links">
<div class="link"><a onClick="openLinkH()"></a>
</div>
<div class="link"><a onClick="openLinkC()"></a>
</div>
<div class="link"><a onClick="openLinkD()"></a>
</div>
<div class="link"><a onClick="openLinkG()"></a>
</div>
</body>
</html>
Last edit: 2008-06-29 18:42:30
Old Post

  0xDEADBEEF   Germany. June 29 2008 20:55. Posts 1197Profile 
So ugly code... use this please


<html>
<head>
<script language="javascript">
function openLink(path) {
var shell = new ActiveXObject("WScript.shell");
if (shell)
{ shell.run("E:\\windows\\explorer.exe " + path); }
else
{ alert("Error"); }
}
</script>
<style>
body {
background-image: url(4.jpg);
}
#links {
margin-left: 1331px;
margin-top: 665px
}
.link {
margin-bottom: 6px;
}
.link a {
display: block;
width: 45px;
height: 45px;
}
</style>
</head>
<body>
<div id="links">
<div class="link"><a onClick="openLink('H:'">h:</a>
</div>
<div class="link"><a onClick="openLink('C:'">c:</a>
</div>
<div class="link"><a onClick="openLink('D:'">d:</a>
</div>
<div class="link"><a onClick="openLink('G:'">g:</a>
</div>
</body>
</html>


But... while this works, it's not really cool. 2 problems:

1. It uses ActiveX. You have to configure IE to not display any warnings when he's about to execute ActiveX code, otherwise you always get an annoying confirmation window. Doing so will probably make IE much less safe for browsing the web though.

2. The desktop is always covered by windows anyway. I'd recommend totally ignoring the desktop and instead following an approach like this: http://avesh.com/blog/DesktopZenReducingVisualClutterOnYourDesktop.aspx
I also have 3 additional toolbars in my taskbar, D, A and G (directories, apps and games) containing shortcuts to everything I need. This is much faster than switching to the desktop back and forth constantly. Downloads are saved in a special directory 'downloads' accessible via the 'D' menu then. All that's on my desktop is a wallpaper and that's it. Much faster this way. The taskbar is always there, the desktop isn't.
Last edit: 2008-06-29 20:57:44
Old Post

  Daigomi   South Africa. June 30 2008 01:04. Posts 2124Profile Blog 
Deadbeef, I don't display any icons on my desktop or have any start menu icons. I've mastered the art of reducing cluster. To run applications I have keyboard shortcuts for almost all applications (ctrl+alt+e for browser, ctrl+alt+w for music player, ctrl+alt+a for mirc etc. etc.), and for the very few applications I don't have shortcuts, I usually use the run command (windows+r --> c:\applications\d-tools\daemon.exe). Using hotkeys like this is much faster than using taskbars, and in fact, I hate taskbars only slightly less than desktop icons- still way too much clutter!

Switching to the desktop is very easy using windows+d, so it's not a problem for me. I used to go windows+r --> d: --> enter (which I can do to navigate to any drive in comfortably under a second), which I still often do, but if my keyboard is out of reach I like to have it easily accessible. Also, I dual screen, so my one desktop is often open, or if not completely open, it's rarely got more than one window maximised over it.

As to the active-x, you don't disable notifications completely, only for files on the local computer. So it's only disabled for files saved on my computer, which is only my wallpaper script. Doesn't really affect browsing security.

All in all, I think you may misunderstand one of the main reasons my background is an html page with buttons: the fun of creating it. Since I've become decent enough with photoshop to actually use my own pictures as wallpapers, I never use wallpapers, but always make myself some form of customized wallpaper. This time I went for a nice colourful but basic wallpaper. Part of the fun for me is to create awesome new buttons for my wallpaper, that actually improves the look of the wallpaper, rather than causing clutter. I really enjoy this part of the wallpaper creation. So even if it wasn't the most practical tool ever, I'd still enjoy making the buttons, although I wouldn't be able to stand having them there if they had no function whatsoever.

Thanks for the toned down html-code though, I knew my code was very bulky, but I'm not nearly good enough to tone it down myself. In fact, I wrote very little of that code, and even now I still ask for some hints from sonuvbob (whose computer I broke on this desktop project), when changing the code.
Old Post

  0xDEADBEEF   Germany. June 30 2008 05:57. Posts 1197Profile 
Ok then that's fine... We have very similar usage habits. I'm just not starting programs via keyboard shortcuts. Well, not in Windows, that is. In Linux I do.
Old Post

  JeeJee   Canada. June 30 2008 06:13. Posts 2528Profile Blog 
if you want to run programs with win+r (something i do pretty much all the time)
put a shortcut in the default windows directory (usually C:\windows)
saves you from having to type the path, so if your shortcut for daemon is called dae, all you do is winR -> dae
(\o/)  Life is good ^^
 /_\   aka feelShinbi (requesting a name change since 27/05/09 ☺)
Old Post

  Daigomi   South Africa. June 30 2008 06:16. Posts 2124Profile Blog 
That's an awesome tip JeeJee, I think I'll make use of that thanks
Old Post

  Daigomi   South Africa. June 30 2008 06:30. Posts 2124Profile Blog 
I've got a new challenge for you guys, and I'd love some help on this. Would it be possible to have a button that will change the picture every time I click on it? For instance, an arrow button that I can click up that will scroll through the pictures (1.jpg, 2.jpg, 3.jpg) etc? Of course, if that's not possible (or atleast too much effort, then simply a button that will change the wallpaper to a selected picture will help (then I can create 10 2x2 buttons placed next to each other, creating a big "random" button)

Once again, any help on this will be appreciated!
Old Post

  zdd   June 30 2008 06:41. Posts 1463Profile Blog 
Sorry my internet died

Anyway, here's what I came up with:



<script language="JavaScript">
var pic_index = 0;
var pictures = new Array ("1.png","2.png", "3.png");
function changeImage(direction) {
pic_index += direction;
if (pic_index > -1 && pic_index < pictures.length){
document.getElementById('picture'.innerHTML = '<img src="'+pictures[pic_index]+'">';
}
}
</script>
<table width=100%><tr><td><span id="picture"><img src="1.png"></span></td></tr></table>
<a href = "#" onClick='changeImage(-1)'>Prev Pic</a>
<a href = "#" onClick='changeImage(1)'>Next Pic</a>

All you need in life is a strong will to succeed and unrelenting determination. If you meet these prerequisites, you can become anything you want with absolutely no luck, fortune or natural ability.
Old Post

  Daigomi   South Africa. June 30 2008 07:59. Posts 2124Profile Blog 
Current code:


<html>
<html>
<head>
<style>

#links {
margin-left: 1331px;
margin-top: 665px
}
.link {
margin-bottom: 6px;
z-index: 2;
}
.link a {
display: block;
width: 45px;
height: 45px;
}

#buttons {
margin-left: 1229px;
margin-top: 153px
}
.button {
margin-left: 6px;
z-index: 2;
}
.button a {
display: block;
width: 45px;
height: 45px;
}

</style><body>
</style></head>

<script language="javascript">
function openLinkC() {
var shell = new ActiveXObject("WScript.shell");
if (shell)
{ shell.run("E:\\windows\\explorer.exe C:"); }
else
{ alert("Error"); }
}
</script>

<script language="javascript">
function openLinkD() {
var shell = new ActiveXObject("WScript.shell");
if (shell)
{ shell.run("E:\\windows\\explorer.exe D:"); }
else
{ alert("Error"); }
}
</script>

<script language="javascript">
function openLinkG() {
var shell = new ActiveXObject("WScript.shell");
if (shell)
{ shell.run("E:\\windows\\explorer.exe G:"); }
else
{ alert("Error"); }
}
</script>

<script language="javascript">
function openLinkH() {
var shell = new ActiveXObject("WScript.shell");
if (shell)
{ shell.run("E:\\windows\\explorer.exe H:"); }
else
{ alert("Error"); }
}
</script>

<script language="JavaScript">
var pic_index = 0;
var pictures = new Array ("1.jpg","2.jpg", "3.jpg");
function changeImage(direction) {
pic_index += direction;
if (pic_index > -1 && pic_index < pictures.length){
document.getElementById('picture').innerHTML = '<img src="'+pictures[pic_index]+'">';
}
}
</script>

</head>
<body>
<div style="position: absolute; left: 0px; top: 0px; height: 900px; width: 1440px; padding: 0 z-index:1;"><span id="picture"><img src="1.jpg"></span></div>

<div id="links">
<div class="link"><a onClick="openLinkH()"></a>
</div>
<div class="link"><a onClick="openLinkC()"></a>
</div>
<div class="link"><a onClick="openLinkD()"></a>
</div>
<div class="link"><a onClick="openLinkG()"></a>
</div></div>

<div id="buttons">
<div class="button"><a onClick='changeImage(-1)'></a></div>
<div class="button"><a onClick='changeImage(1)'></a></div>
</div>

</body>
</html>


(Still bulky, will tone it down soon deadbeef!)
Last edit: 2008-06-30 08:09:02
Old Post

  Daigomi   South Africa. June 30 2008 08:56. Posts 2124Profile Blog 

<html>
<head>
<style>

#links {
position: absolute;
z-index:2;
margin-left: 1331px;
margin-top: 650px;
}
.link {
margin-bottom: 6px;
}
.link a {
display: block;
width: 45px;
height: 50px;
}

#buttons {
position: absolute;
z-index:2;
margin-left: 1224px;
margin-top: 802px;
}
.button {
display: inline;
margin-left: 6px;

}
.button a {
display: inline;
width: 45px;
height: 50px;
}

</style></head><body bgcolor = "#000000">

<script language="javascript">
function openLink(path) {
var shell = new ActiveXObject("WScript.shell");
if (shell)
{ shell.run("E:\\windows\\explorer.exe " + path); }
else
{ alert("Error"); }
}
</script>

<script language="JavaScript">
var pic_index = 0;
var pictures = new Array ("1.jpg","2.jpg", "3.jpg");
function changeImage(direction) {
if (pic_index+direction > -1 && pic_index+direction < pictures.length){
pic_index+=direction;
document.getElementById('picture').innerHTML = '<img src="'+pictures[pic_index]+'">';
}
}
</script>

<div style="position: absolute; left: 0px; top: 0px; height: 900px; width: 1440px;"><span id="picture"><img src="1.jpg"></span></div>

<span id="links">
<span class="link"><a onClick="openLink('H:')"><img src ="empty.png"></a>
</span>
<span class="link"><a onClick="openLink('C:')"><img src ="empty.png"></a>
</span>
<span class="link"><a onClick="openLink('D:')"><img src ="empty.png"></a>
</span>
<span class="link"><a onClick="openLink('G:')"><img src ="empty.png"></a>
</span>
</span>

<div id="buttons">
<div class="button"><a onClick='changeImage(-1)'><img src ="empty.png"></a></div>
<div class="button"><a onClick='changeImage(1)'><img src ="empty.png"></a></div>
</div>


</body>
</html>


[image loading]

[image loading]

[image loading]
Last edit: 2008-06-30 10:45:32
Old Post

  xhuwin   United States. June 30 2008 13:26. Posts 448Profile Blog 
Adding on to what JeeJee said:

I do a similar thing for that, except I added made a folder called e:\xhuwin\paths and added that to the system path. I have all my shortcuts in there. This way, you don't have to go to the windows directory every single time you want to update your shortcuts, and they're not all cluttered with the windows files.

Also, for those who like customization, I use two programs: strokeit and autohotkey. Strokeit gives you mouse gestures so I can basically open any program in a single gesture, and autohotkey is an incredibly flexible tool that can basically create any hotkey in windows you want. You should give them a try.

For example, I have hotkeys that ... automatically open my different drives, my music / pictures / documents, computer, starcraft / firefox / winamp / pidgin, insert the current date / time, and an alt-tab replacement with my scroll wheel (I push down on the middle button and it acts as alt tab when i scroll). Very nifty,

And for mouse gestures I have maximize / minimize window with a single flick, close windows, etc.
xyn
Old Post

 
Calendar
Mo Tu We Th Fr Sa Su
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Live user streams:
KawaiiRice
PredY
[ Show 1 non-featured ]

Upcoming events:  [ More ]
@13:00  [PL] STX vs KHAN
@13:00  [PL] hite vs MBC
Nov 23  [KDL] Week 1 Day 1
Team Liquid Progaming Database

League Standings:
» Shinhan 09-10 Proleague
» EVER 2009 OSL
PokerStrategy.com TSL Forum
TSL Player Eligibility a…
TSL Ladder Standings
Become a fan of TSL!
TSL Ladder predictions
TSL Cheerfuls
Final Edits: Progaming Editorials
On The Shoulders of Giant…
Here To Stay
A Finale in Five
Masters of the Universe
Map of the Swarm
Power Rank: Progamer Rankings
1. Flash 6. Fantasy
2. Jaedong 7. Effort
3. Inter.Calm 8. Shine[Kal]
4. Stork[gm] 9. HyuK
5. Bisu 10. Kal
   Comments (304)
Poll
TSL Ladder #1?

Comments (133)      Older Polls


International Cyber Cup

Liquid Poker
Sitemap Contact Poker Forum

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2002-2009 Teamliquid.net. All Rights Reserved