amokoura Posted March 5, 2008 Share Posted March 5, 2008 (edited) If I don't like the dll interface to AutoIt, isn't it easy to rewrite the functions? Currently I'm focused on window manipulation, so wouldn't I need just to use user32.dll functions? Or are there so many hacks and tricks I should know before I could write my on WinActivate() and WinExists() ? Edited March 6, 2008 by amokoura Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 5, 2008 Share Posted March 5, 2008 Check out the source. It's got most of those functions in it. The source is outdated, but it is a useful starting point. Link to comment Share on other sites More sharing options...
amokoura Posted March 5, 2008 Author Share Posted March 5, 2008 Check out the source. It's got most of those functions in it. The source is outdated, but it is a useful starting point.Thanks! The Window functions might've not changed much. Link to comment Share on other sites More sharing options...
amokoura Posted March 5, 2008 Author Share Posted March 5, 2008 Wait a minute, there isn't any source available?? Where can I get? Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 5, 2008 Share Posted March 5, 2008 http://www.autoitscript.com/forum/index.php?showtopic=8389It's a sticky at the top of this forum. (C++) Link to comment Share on other sites More sharing options...
amokoura Posted March 5, 2008 Author Share Posted March 5, 2008 (edited) http://www.autoitscript.com/forum/index.php?showtopic=8389It's a sticky at the top of this forum. (C++)Yeah I checked it out but there aren't any source files in the mentioned site.BTW I checked AutoHotKey's source. At least it's available. And most likely similar with AutoIt. Edited March 5, 2008 by amokoura Link to comment Share on other sites More sharing options...
NELyon Posted March 5, 2008 Share Posted March 5, 2008 http://www.autoitscript.com/autoit3/files/...-v3.1.0-src.exe Link to comment Share on other sites More sharing options...
Developers Jos Posted March 5, 2008 Developers Share Posted March 5, 2008 BTW I checked AutoHotKey's source. At least it's available. And most likely similar with AutoIt.Just do a search on that topic and I am sure you get all the details on that one. SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 5, 2008 Moderators Share Posted March 5, 2008 (edited) If I don't like the dll interface to AutoIt, isn't it easy to rewrite the functions?Currently I'm focused on window manipulation, so wouldn't I need just to use user32.dll functions?Or are there so many hacks and tricks I should know before I could write my on WinActivate() and WinExists() ?I'm sure that:GetActiveWindowSetActiveWindowIsWindowFindWindowAPI calls are all you're looking for?Edit:Forgot SetActiveWindow Edited March 5, 2008 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
amokoura Posted March 5, 2008 Author Share Posted March 5, 2008 http://www.autoitscript.com/autoit3/files/...-v3.1.0-src.exeThank you! I was just blind.I'm sure that:GetActiveWindowSetActiveWindowIsWindowFindWindowAPI calls are all you're looking for?Edit:Forgot SetActiveWindowYeah. Exactly those. And the one which returns all windows.For now, I've managed well with the AutoIt dll. Just preparing for a situation where I might have to write as elegant Window manipulation functions as AutoIt has. Gotta check how much effort it would require. Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 5, 2008 Share Posted March 5, 2008 There is no function that just returns all the windows. You have to call EnumWindows for that, and provide a function to pick up each individual window. It's kinda messy. Link to comment Share on other sites More sharing options...
amokoura Posted March 5, 2008 Author Share Posted March 5, 2008 There is no function that just returns all the windows. You have to call EnumWindows for that, and provide a function to pick up each individual window. It's kinda messy.Yeah. That's why I'll try to stick with AutoIt as long as possible Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 6, 2008 Share Posted March 6, 2008 I never said it was hard. I just said it was messy. Link to comment Share on other sites More sharing options...
cppman Posted March 6, 2008 Share Posted March 6, 2008 (edited) expandcollapse popup#include <windows.h> #include <iostream> #include <vector> struct WinInfo { HWND WindowHandle; LPSTR WindowTitle; }; BOOL CALLBACK PartnerCallback(HWND hWindow, LPARAM lParam) { std::vector<WinInfo> *pVector = (std::vector<WinInfo>*)lParam; WinInfo wi; wi.WindowHandle = hWindow; wi.WindowTitle = new char[256]; GetWindowTextA(hWindow, wi.WindowTitle, 256); pVector->push_back(wi); return TRUE; } std::vector<WinInfo>* WinList() { std::vector<WinInfo> *pVector = new std::vector<WinInfo>(); EnumWindows(PartnerCallback, (LPARAM)pVector); return pVector; } int main() { std::vector<WinInfo> *pWindows = WinList(); for (size_t i = 0; i < pWindows->size(); i++) { std::cout << pWindows->at(i).WindowTitle << "\n"; delete[] pWindows->at(i).WindowTitle; } delete pWindows; while(1) {} }Well, here is one way to do it. Probably not the best way. Hell, probably not even a good way - but it works. Edited March 6, 2008 by chris95219 Miva OS Project Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 6, 2008 Share Posted March 6, 2008 Why are you using pointer-to-struct? Link to comment Share on other sites More sharing options...
cppman Posted March 6, 2008 Share Posted March 6, 2008 Just habbit, I guess. Miva OS Project Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now