Columbus - a fast program launcher/searcher

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: Columbus - a fast program launcher/searcher

24 Nov 2015, 09:43

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
dsewq1LYJ
Posts: 116
Joined: 26 Aug 2014, 23:21

Re: Columbus - a fast program launcher/searcher

24 Nov 2015, 18:53

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
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 ?
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: Columbus - a fast program launcher/searcher

24 Nov 2015, 20:02

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 ?
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.

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.
dsewq1LYJ
Posts: 116
Joined: 26 Aug 2014, 23:21

Re: Columbus - a fast program launcher/searcher

25 Nov 2015, 01:59

Run1e wrote:
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 ?
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.

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.
Hello.

I got two files
Columbus.ahk AND Test.ahk

After execute Columbus.ahk. I press down CTRL+ALT+P, my cursor looks like loading something, but it revert to General Cursor immediately and of course nothing appear.

so I launch Test.ahk
CODE

Code: Select all

x:=ComObjActive("{436cf066-cf70-4ca9-990f-c7083fea8367}")
(a:=x.get("Main")).Pos(5, 5, 500, 355)
a.Show()
or even hide the Columbus

Code: Select all

x:=ComObjActive("{436cf066-cf70-4ca9-990f-c7083fea8367}")
(a:=x.get("Main"))
a.Hide()
but as your description, I still can not using the "CTRL+ALT+P" to toggle Columnbus after executed the code.
-------------------------
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: Columbus - a fast program launcher/searcher

25 Nov 2015, 04:32

Try typing in Columbus after running the code I gave you:
/set Compress 0

If the hotkey works now, it means it has something to do with the stuff I was working on related to the Compress setting.
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: Columbus - a fast program launcher/searcher

25 Nov 2015, 04:52

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)
dsewq1LYJ
Posts: 116
Joined: 26 Aug 2014, 23:21

Re: Columbus - a fast program launcher/searcher

25 Nov 2015, 18:46

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)
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 ? :crazy:
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: Columbus - a fast program launcher/searcher

26 Nov 2015, 05:00

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 ? :crazy:
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
Posts: 116
Joined: 26 Aug 2014, 23:21

Re: Columbus - a fast program launcher/searcher

26 Nov 2015, 05:45

Run1e wrote:
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 ? :crazy:
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.
Deeply thanks !
MY LORD 8-)
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: Columbus - a fast program launcher/searcher

01 Dec 2015, 09:09

dsewq1LYJ wrote:
Run1e wrote:
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 ? :crazy:
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.
Deeply thanks !
MY LORD 8-)
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
Posts: 116
Joined: 26 Aug 2014, 23:21

Re: Columbus - a fast program launcher/searcher

06 Dec 2015, 20:52

Run1e wrote:
dsewq1LYJ wrote:
Run1e wrote:
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 ? :crazy:
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.
Deeply thanks !
MY LORD 8-)
Do you have skype? I would like to chat to you as the debugging process will take longer if we communicate through this thread.
Uh ~ I dont have an account of Skype. but is any other platform we can use ?

I dont really wanna install skype in my Laptop :oops:
so...what If it's necessary I'll do it.
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: Columbus - a fast program launcher/searcher

07 Dec 2015, 02:51

dsewq1LYJ wrote:
Run1e wrote:
dsewq1LYJ wrote:
Run1e wrote:
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 ? :crazy:
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.
Deeply thanks !
MY LORD 8-)
Do you have skype? I would like to chat to you as the debugging process will take longer if we communicate through this thread.
Uh ~ I dont have an account of Skype. but is any other platform we can use ?

I dont really wanna install skype in my Laptop :oops:
so...what If it's necessary I'll do it.
Yeah ok, just name a a platform and I'll add you on it.
ozzii
Posts: 481
Joined: 30 Oct 2013, 06:04

Re: Columbus - a fast program launcher/searcher

07 Dec 2015, 08:43

Well you can use skype from inside the browser (from the site).
No need to install anything.
User avatar
keyclick
Posts: 3
Joined: 13 Jan 2015, 08:24

Re: Columbus - a fast program launcher/searcher

06 Jan 2016, 08:05

Run1e

Can one use Function Hotkey names in the Columbus search-fuzzy program list?
I struggle to recall all my hotkeys, this addition would allow me to find & trigger my
hotkeys using a fuzzy name search.

An example using Columbus to match Function Hotkey

Ctrl-Alt-P editor open

Columbus matches function in autohotkey.ahk file

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%"
          }
Columbus Fires the hotkey ^+e

What do you think, is this already doable another way?

Function Hotkeys [v1.1.20+]
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: Columbus - a fast program launcher/searcher

06 Jan 2016, 09:52

keyclick wrote: What do you think, is this already doable another way?
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.

/
Run1e
User avatar
keyclick
Posts: 3
Joined: 13 Jan 2015, 08:24

Re: Columbus - a fast program launcher/searcher

06 Jan 2016, 12:31

Run1e
Cool, Yes I'd pursue this.
A plugin example would help me get started getting this to work.

keyClick Clack I'm out
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: Columbus - a fast program launcher/searcher

06 Jan 2016, 15:14

Edit: the script didn't stay alive, added a hotkey so it doesn't close
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
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.

Replace the 'dir' variable with a folder on your computer with some .jpg files in it, and the pictures will be listed in Columbus.

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
Some helpful commands you can use while debugging/working with plugins:

/set List [listname] (note, the default list is called 'items')
/xml (shows the xml file in a msgbox)
/dir (opens the directory where you can look at the xml file a little more clearly)
/rel (restart Columbus quickly)

Hope this helps. Shoot me up here if you need help with anything, which you probably will need considering the plugin system is half-finished and not documented.

Good luck :)

/
Run1e
Elesar-nli

Re: Columbus - a fast program launcher/searcher

11 Jan 2016, 16:50

Speaking of the Chrome Favorites plugin...Here it is, in all of its partially finished glory! It works decently well, but doesn't handle bookmark "folders", so you only get top level bookmarks. It also gets bookmarks from all Chrome profiles found in Local AppData (Current Windows user, doesn't care who is currently signed into Chrome).

This was a collaboration between Run1e and myself, as I had no idea where to start for a plugin, and I have modified his initial example a bit to work out the "multiple chrome profiles" thing. I'll get around to fixing the bookmark folders thing eventually...

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
}
User avatar
keyclick
Posts: 3
Joined: 13 Jan 2015, 08:24

Re: Columbus - a fast program launcher/searcher

11 Jan 2016, 22:12

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
User avatar
runie
Posts: 304
Joined: 03 May 2014, 14:50
Contact:

Re: Columbus - a fast program launcher/searcher

12 Jan 2016, 13:15

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
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.

As said just shoot up here if you need any help with anything.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 85 guests