icon open icon ?

Hi, I have a problem with desktopx, I try to do a simple shortcut widget, I assign the widget a shortcut to Internet explorer, all fine so far, I then export it as a widget,stand alone, but here is what i don´t understand, the exported widget is a shortcut, opens the newly created widget ??, so I have two icons to run IE, so where am I thinking wrong ??, I only need one
2,919 views 6 replies
Reply #1 Top
I just:
created a new object
gave it a png as appearance
changed from layer to shortcut - file
browsed to IE and set the target

right clicked on the object
chose 'export'
exported as a widget called 'IEtest'
said it was saved
closed DTX
opened my widget folder and double clicked 'IEtest'
it appeared, clicked it and voila


how did you do it?
Reply #3 Top
Thanks for the reply
how did you do it?
Actually, I did as you, but I thought wrong, I thought I could create a widget and then assign a keyboard shortcut to it with the help of keyboard launchpad but it didn´t work. Before I tried with Object.Registerhotkey, but I didn´get that to work either, So what I am trying to do is to have an object to respond to a keyboard shortcut, say if I press F5 then I want to open IE or something else...can´t figure it out
Reply #4 Top
ah....

I got nothing...
took me a year to figure out how to change the default pic on new objects...  
Reply #5 Top
Let me clarify what you said, you want create widget who when you press F5 in your keyboard open IExplorer?

and what you have done as script for now, act like that: You press F5 and it open again the widget?

i can't see your script so i'll make a line:

F5 open the widget so
use Sub onscript_enter might help where you have your code for the keyboard key act.
and add at the end a function to close (not minimise) the widget once IE is open/ once the widget has acted like you wanted.

Quentin94 keeps Keyboard launchpad
Reply #6 Top
Hi, I did a search yesterday and found this WWW Link it is almost what I am looking for, but you have to put in the hotkey at runtime, and that is not what I want, I want to hardcode the hotkey in the script, but I have no clue how to do this, the script so far, which isn´t mine looks like this :

'Called when the script is executed
Sub Object_OnScriptEnter

End Sub

'Called when the script is terminated
Sub Object_OnScriptExit
Object.UnregisterHotkey(1)
End Sub

Dim h

Sub Object_OnLButtonUp(x,y,dragged)
If Not dragged Then
Set form=Desktopx.CreateForm
form.AddPreference("Hotkey")
form.Preference("Hotkey").Type="hotkey"
form.Preference("Hotkey").Caption="Hotkey:"
form.Preference("Hotkey").Value=h
If( form.Prompt ) Then
h=form.Preference("Hotkey").Value
MsgBox("Setting hotkey")
Object.RegisterHotkey 1, form.Preference("Hotkey").Value

End If
End If
End Sub

Sub Object_OnHotkey(id)
Set WshShell = CreateObject("WScript.Shell")

WshShell.Run "http://www.google.com"

End Sub