#computertech Bot Logged User list

Network: TechNet
Modes: +ntf
Last Seen: 2 months, 1 week ago
Topic:
2
Users

Channel Log Archive for #computertech

Prev
Next

* All times are UTC
Filtering by user: NiniGeo2/rizon
Thursday, January 26, 2023
[03:57:06] NiniGeo2/rizon !quak
[04:04:18] NiniGeo2/rizon Veggies!
[04:04:52] NiniGeo2/rizon \^______^/
[04:05:05] NiniGeo2/rizon !quak
[04:06:08] NiniGeo2/rizon Try again? I successfully quak'd at the duk! :]
[04:06:39] NiniGeo2/rizon Oh no that's what !bang is for :3
[04:07:09] NiniGeo2/rizon Lua always bothers me for having 1-based arrays instead of the 0-based arrays that pretty much every other programming language use :P
[04:07:15] NiniGeo2/rizon OIC
[04:07:41] NiniGeo2/rizon I used to use lua back in the day to write WoW addons :P
[04:08:25] NiniGeo2/rizon I mean that's how you were supposed to do it. These weren't like bots or scripts - the game's scripting engine that is designed to be integrated with third party plugins runs lua in the game :P
[04:11:07] NiniGeo2/rizon Well at least it got further.
[04:11:11] NiniGeo2/rizon 24 lines further than last time!
[04:12:08] NiniGeo2/rizon Hmmmm, so the hook_command() worked, but the printf() didn't?
[04:13:07] NiniGeo2/rizon Wooooooooooooo!
[04:13:16] NiniGeo2/rizon Woah! So many faces!
[04:14:13] NiniGeo2/rizon Looks like gtk.WINDOW_TOPLEVEL isn't set yet?
[04:15:39] NiniGeo2/rizon Hmmm this other snippet that I see elsewhere online says that you gotta do "MainWin.new()" and "gtk.main()" before you can call the other GTK functions.
[04:16:02] NiniGeo2/rizon Sorry I mean "gtk.window_new(gtk.WINDOW_TOPLEVEL)".
[04:16:56] NiniGeo2/rizon Try it right before your "hexchat.hook_command("open", open_window)"
[04:17:43] NiniGeo2/rizon Hmm it doesn't know about the window_new() function huh? That might be in a different version of GTK then?
[04:17:58] NiniGeo2/rizon :D
[04:17:59] NiniGeo2/rizon Yay!
[04:21:11] NiniGeo2/rizon :O!
[04:21:13] NiniGeo2/rizon Superhacker detected!
[04:21:27] NiniGeo2/rizon :O!
[04:21:45] NiniGeo2/rizon o:
[04:28:01] NiniGeo2/rizon G'nini Darthkilroy
[05:31:42] NiniGeo2/rizon Wooooo cookies!
[05:32:19] NiniGeo2/rizon Hmmm, for integration work like that I'd suggest trying to get each part to work individually first, and then you can try combining them later after you know how to set up and use each individual component :]
[05:33:44] NiniGeo2/rizon Oh that's pretty good. Looks like you made a GTK window in your Hexchat plugin?
[05:35:57] NiniGeo2/rizon Oh you may want to read through some of these lua-gtk examples. There's a lotta examples that people have made with working code samples :] https://github.com/Miqueas/Lua-GTK-Examples
[05:37:26] NiniGeo2/rizon I hope it helps! ^_____^
[05:38:29] NiniGeo2/rizon Oh dang you're right, those were examples for GTK 3 apparently :o
[05:39:34] NiniGeo2/rizon Ok yeah this guy's examples are for GTK2 with lua-gtk: https://github.com/luaforge/lua-gtk/tree/master/lua-gtk/examples
[05:40:27] NiniGeo2/rizon :3
[05:41:19] NiniGeo2/rizon Ah here in the button example it shows how to hook up a function to a button: https://github.com/luaforge/lua-gtk/blob/master/lua-gtk/examples/button.lua
[05:42:03] NiniGeo2/rizon So I think you gotta do: "button:connect('clicked', your_button_click_function_here)"
[05:42:15] NiniGeo2/rizon That should connect the 'clicked' event on the button to your callback function.
[05:45:46] NiniGeo2/rizon The other thing that I see all of these examples do, that I'm not sure if you need to do or not, is to call "gtk.main()" at the end to have GTK run its main update loop.
[06:01:39] NiniGeo2/rizon Awww, that's sweet.
Prev
Next