Code: Select all
#SingleInstance force
x:=ComObjActive("{436cf066-cf70-4ca9-990f-c7083fea8367}")
(a:=x.get("Main")).Pos(5, 5, 500, 355)
a.Show()
msgbox % a.IsVisible
Code: Select all
#SingleInstance force
x:=ComObjActive("{436cf066-cf70-4ca9-990f-c7083fea8367}")
(a:=x.get("Main")).Pos(5, 5, 500, 355)
a.Show()
msgbox % a.IsVisible
Wow.It really appear.Run1e wrote:Try running this and tell me if the window appears.Code: Select all
#SingleInstance force x:=ComObjActive("{436cf066-cf70-4ca9-990f-c7083fea8367}") (a:=x.get("Main")).Pos(5, 5, 500, 355) a.Show() msgbox % a.IsVisible
Does CTRL+ALT+P make the window appear now? If not, are you sure it says CTRL+ALT+P here in the settings menu (http://runie.me/?i=zNKfV)? If you still struggle making the window appear, please get back to me.dsewq1LYJ wrote: Wow.It really appear.
So ~ I need to replace Gui.Show() function right ?
and by the way ~ what's the problem of my second question ?
Hello.Run1e wrote:Does CTRL+ALT+P make the window appear now? If not, are you sure it says CTRL+ALT+P here in the settings menu (http://runie.me/?i=zNKfV)? If you still struggle making the window appear, please get back to me.dsewq1LYJ wrote: Wow.It really appear.
So ~ I need to replace Gui.Show() function right ?
and by the way ~ what's the problem of my second question ?
The program does not "pick up" all programs in the computer by default. If you miss a program, you can find a shortcut/exe and drag it onto the Columbus gui, and it should be added.
Code: Select all
x:=ComObjActive("{436cf066-cf70-4ca9-990f-c7083fea8367}")
(a:=x.get("Main")).Pos(5, 5, 500, 355)
a.Show()
Code: Select all
x:=ComObjActive("{436cf066-cf70-4ca9-990f-c7083fea8367}")
(a:=x.get("Main"))
a.Hide()
Uh ~ Pretty sad. The same situation, my cursor turn into loading, and revert to general pointer in second and without appear anything.Run1e wrote:Also, please try typing in this before trying the above:
/update 1
This will force update to the latest version (which might not have been directly iterated as a subversion)
Ok. I'll make a script for you that logs what happens so that we can debug this properly. I did also read your PM, and I'll take a closer look at it later.dsewq1LYJ wrote: Uh ~ Pretty sad. The same situation, my cursor turn into loading, and revert to general pointer in second and without appear anything.
by the way ~ after I entered the "/update 1" there's a notification tell me Columbus has been updated to lastest vesrion.
------
AND did you read my PM Sir ?
Deeply thanks !Run1e wrote:Ok. I'll make a script for you that logs what happens so that we can debug this properly. I did also read your PM, and I'll take a closer look at it later.dsewq1LYJ wrote: Uh ~ Pretty sad. The same situation, my cursor turn into loading, and revert to general pointer in second and without appear anything.
by the way ~ after I entered the "/update 1" there's a notification tell me Columbus has been updated to lastest vesrion.
------
AND did you read my PM Sir ?
Do you have skype? I would like to chat to you as the debugging process will take longer if we communicate through this thread.dsewq1LYJ wrote:Deeply thanks !Run1e wrote:Ok. I'll make a script for you that logs what happens so that we can debug this properly. I did also read your PM, and I'll take a closer look at it later.dsewq1LYJ wrote: Uh ~ Pretty sad. The same situation, my cursor turn into loading, and revert to general pointer in second and without appear anything.
by the way ~ after I entered the "/update 1" there's a notification tell me Columbus has been updated to lastest vesrion.
------
AND did you read my PM Sir ?
MY LORD
Uh ~ I dont have an account of Skype. but is any other platform we can use ?Run1e wrote:Do you have skype? I would like to chat to you as the debugging process will take longer if we communicate through this thread.dsewq1LYJ wrote:Deeply thanks !Run1e wrote:Ok. I'll make a script for you that logs what happens so that we can debug this properly. I did also read your PM, and I'll take a closer look at it later.dsewq1LYJ wrote: Uh ~ Pretty sad. The same situation, my cursor turn into loading, and revert to general pointer in second and without appear anything.
by the way ~ after I entered the "/update 1" there's a notification tell me Columbus has been updated to lastest vesrion.
------
AND did you read my PM Sir ?
MY LORD
Yeah ok, just name a a platform and I'll add you on it.dsewq1LYJ wrote:Uh ~ I dont have an account of Skype. but is any other platform we can use ?Run1e wrote:Do you have skype? I would like to chat to you as the debugging process will take longer if we communicate through this thread.dsewq1LYJ wrote:Deeply thanks !Run1e wrote:Ok. I'll make a script for you that logs what happens so that we can debug this properly. I did also read your PM, and I'll take a closer look at it later.dsewq1LYJ wrote: Uh ~ Pretty sad. The same situation, my cursor turn into loading, and revert to general pointer in second and without appear anything.
by the way ~ after I entered the "/update 1" there's a notification tell me Columbus has been updated to lastest vesrion.
------
AND did you read my PM Sir ?
MY LORD
I dont really wanna install skype in my Laptop
so...what If it's necessary I'll do it.
Code: Select all
^+e::
editor_open_folder() {
WinGetTitle, path, A
if RegExMatch(path, "\*?\K(.*)\\[^\\]+(?= [-*] )", path)
if (FileExist(path) && A_ThisHotkey = "^+e")
Run explorer.exe /select`,"%path%"
else
Run explorer.exe "%path1%"
}
Yes, this can be done using the plugin system, but that's not documented or finished. I've made several scripts that do similar things only with Chrome bookmarks or school documents. The custom list functionality in Columbus works pretty well. If you want I could write you a short example of how to make a list and handle in in a plugin.keyclick wrote: What do you think, is this already doable another way?
Made this rather quickly to illustrate how the essentials work, I have to apologize as my motivation for coding has been on an all-time low and development has been slow for Columbus, regardless of the cool plans I have for it.keyclick wrote:Run1e
Cool, Yes I'd pursue this.
A plugin example would help me get started getting this to work.
keyClick Clack I'm out
Code: Select all
#SingleInstance force
global x, Settings
x:=ComObjActive("Columbus") ; connect to Columbus via COM
x.Connect(A_ScriptHwnd, Event) ; connect so that Columbus will call the Event class in this script, and close this script when Columbus closes
Settings := x.get("Settings") ; get the settings object, we need this in Event.OnSubmit() to check if the current list is correct when trying to launch something.
dir := "D:\Pictures" ; a directory containing .jpg files
list := x.CreateList("test") ; create a list object
Loop % dir "\*.jpg" ; loop the jpg files in that folder
list.Add(SubStr(A_LoopFileName, 1, -4), A_LoopFileFullPath, A_LoopFileFullPath) ; add them to the list
x.SetList("test") ; set the current list to test
return
Class Event { ; event handler class
OnSubmit(done, item, input) {
if !done && (Settings.List = "test") { ; true if the default Columbus behaviour has not run and and the current list is "test"
msgbox % item
; note: putting 'return true' at this point will make Columbus abort its default behaviour, which is useful if you want to do something else when running something in Columbus
}
}
}
~A::return ; keep the script alive
Code: Select all
#SingleInstance Force
#NoEnv
#Persistent
OnExit, Disconnect
/*
To Do:
Implement retrieving bookmarks from within folders (make getBookmarks() recursive)
*/
;<===== Connect to Columbus =================================================>
global x := ComObjActive("{436cf066-cf70-4ca9-990f-c7083fea8367}")
x.Connect(A_ScriptHwnd, Events)
global Settings := x.get("Settings") ; get settings object
global book := x.CreateList("bm") ; create a Columbus list named bm
book.FreqSort := true ; enable freqsort for the list
; Get all bookmarks for the current windows user (all chrome profiles searched)
Loop, % A_AppData . "\..\Local\Google\Chrome\User Data\Bookmarks", 0, 1
getBookmarks(book, A_LoopFileFullPath)
Hotkey, ^!L, ToggleBookmarks
return
;<===== Plugin Class ========================================================>
Class Events {
OnSubmit(done, text, input) {
if (Settings.List = "bm") && done && (input != Settings.Prefix "bm")
x.SetList("items")
else if (input = Settings.Prefix "bm") && !done
x.SetList("bm")
}
OnHotkey(done, key) {
if (Key = "Escape") && (Settings.List = "bm") && !done {
x.SetList("items")
return true
}
}
}
;<===== Labels ==============================================================>
Disconnect:
ComObjError(false)
x.Disconnect(A_ScriptHwnd)
ExitApp
ToggleBookmarks:
if (Settings.List = "items")
Settings.List := "bm"
else
Settings.List := "items"
return
;<===== Functions ===========================================================>
ParseJson(jsonStr) {
SC := ComObjCreate("ScriptControl")
SC.Language := "JScript"
ComObjError(false)
jsCode =
(
function arrangeForAhkTraversing(obj){
if(obj instanceof Array){
for(var i=0 ; i<obj.length ; ++i)
obj[i] = arrangeForAhkTraversing(obj[i]) ;
return ['array',obj] ;
}else if(obj instanceof Object){
var keys = [], values = [] ;
for(var key in obj){
keys.push(key) ;
values.push(arrangeForAhkTraversing(obj[key])) ;
}
return ['object',[keys,values]] ;
}else
return [typeof obj,obj] ;
}
)
SC.ExecuteStatement(jsCode "; obj=" jsonStr)
return convertJScriptObjToAhks( SC.Eval("arrangeForAhkTraversing(obj)") )
}
/*
Function: convertJScriptObjToAhks(jsObj)
Used by ParseJson()
*/
convertJScriptObjToAhks(jsObj) {
if(jsObj[0]="object"){
obj := {}, keys := jsObj[1][0], values := jsObj[1][1]
loop % keys.length
obj[keys[A_INDEX-1]] := convertJScriptObjToAhks( values[A_INDEX-1] )
return obj
}else if(jsObj[0]="array"){
array := []
loop % jsObj[1].length
array.insert(convertJScriptObjToAhks( jsObj[1][A_INDEX-1] ))
return array
}else
return jsObj[1]
}
getBookmarks(ByRef book, bmkfile) {
file := fileOpen(bmkfile, "r")
json := file.read()
file.Close()
bookmarks := ParseJson(json)
; add the bookmarks to the list
for root in bookmarks["roots"]
{
for each, bookmark in bookmarks["roots", root, "children"]
{
if (bookmark["type"] == "url")
{
book.add(bookmark["name"], bookmark["url"], "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", true)
}
}
}
return
}
Cool to see you got it working What you see these is essentially the bare essentials of how userfriendly you can make a plugin like that. Simple things like a hotkey to switch between Columbus lists can be made if you want Columbus to display more than one list easily.keyclick wrote:Run1e
The Plugin code you supplied above worked without any struggles. I had something going in minutes
Shot video clip of my Plugin code working, Simple folder of bmp images, Very cool
https://drive.google.com/file/d/0B8KR17 ... sp=sharing
Keyclick clack
Return to “Scripts and Functions (v1)”
Users browsing this forum: No registered users and 188 guests