Results 1 to 16 of 16

Thread: Global shortcut + other program

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2009
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8

    Default Global shortcut + other program

    Hello.
    I'm building an app that will help me in playing games(not a cheat).
    So first of all, is there a way how to make when my app is minimized to the system try(building for windows mainly)while play game in the same time(lets say counter strike) and i press some button/combinations of buttons my app to catch the signal. So, i am inside the game, playing it but my application waits for the sygnal.

    Second i need to build in my application is when it catches that signal to send some signal like i did it with my keyboard.

    The example application that i've seen is a program than makes short words larger. For example when someone write bbl the aplication returned "be back later" in the game.

    I know its something specific, but i didn't know how to search for it, so if you give me some example it would be good.

    Thank you deemeetar.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Global shortcut + other program

    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    deemeetar (29th September 2009)

  4. #3
    Join Date
    Jul 2009
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8

    Default Re: Global shortcut + other program

    Can anyone show me some example 'cos im newbie, don't realy get it how to use it.

  5. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Global shortcut + other program

    What have you tried so far? Did you manage to download, build and install Qxt?
    J-P Nurmi

  6. The following user says thank you to jpn for this useful post:

    deemeetar (29th September 2009)

  7. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Global shortcut + other program

    Here are snippets from one of the Qxt test apps:
    Qt Code:
    1. int main(int argc, char* argv[])
    2. {
    3. QxtApplication app(argc, argv);
    4. // ...
    5. }
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. QxtGlobalShortcut* shortcut = new QxtGlobalShortcut(this);
    2. connect(shortcut, SIGNAL(activated()), this, SLOT(toggleVisibility()));
    3. if (!shortcut->setShortcut(QKeySequence("Ctrl+Shift+Alt+S")))
    4. // ...
    To copy to clipboard, switch view to plain text mode 
    PS. QxtApplication is no more needed in the development version (upcoming 0.6 version).
    J-P Nurmi

  8. The following user says thank you to jpn for this useful post:

    deemeetar (29th September 2009)

  9. #6
    Join Date
    Jul 2009
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8

    Default Re: Global shortcut + other program

    I can't install qxt. Here is what i do.:
    Download and extract
    Run vs2008 cmd
    go to the extracted folder
    run configure -msvc
    run nmake and it gives me:
    C:\Users\Dimitar\Documents\Downloads\libqxt-0.5.0\libqxt-0.5.0>nmake

    Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
    Copyright (C) Microsoft Corporation. All rights reserved.

    cd tools\doqsy\ && mingw32-make -f Makefile
    mingw32-make -f Makefile.Debug
    Makefile.Debug:60: *** missing separator. Stop.
    mingw32-make[1]: Entering directory `C:/Users/Dimitar/Documents/Downloads/libqxt
    -0.5.0/libqxt-0.5.0/tools/doqsy'
    mingw32-make[1]: Leaving directory `C:/Users/Dimitar/Documents/Downloads/libqxt-
    0.5.0/libqxt-0.5.0/tools/doqsy'
    mingw32-make: *** [debug] Error 2
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    First it saied qmake is not in the path so i added:
    C:\Qt\4.5.2\qmake;
    to the path, than it tried to compile but the error happens.

    Sollution please.

  10. #7
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Global shortcut + other program

    It almost looks like you have run configure multiple times. One time it detected mingw32-make in your environment, and generated makefiles for that. Another time you ran configure -msvc, which generated visual studio project files (not makefiles!). Then you try to compile with nmake, which uses makefiles generated for mingw32-make.
    J-P Nurmi

  11. The following user says thank you to jpn for this useful post:

    deemeetar (29th September 2009)

  12. #8
    Join Date
    Jul 2009
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8

    Default Re: Global shortcut + other program

    Ok, i extracted it aggain.
    Than using command prompt(the system default one) i went to the extracted location:
    Qt Code:
    1. C:\libqxt\libqxt-0.5.0
    To copy to clipboard, switch view to plain text mode 
    Then i wrote
    Qt Code:
    1. configure
    To copy to clipboard, switch view to plain text mode 
    and then i wrote
    Qt Code:
    1. mingw32-make
    To copy to clipboard, switch view to plain text mode 
    but error aggain.
    Here is the whole console text:
    Qt Code:
    1. C:\libqxt\libqxt-0.5.0>configure
    2. Testing for qmake...
    3. Testing for mingw32-make...
    4. Using mingw32-make.
    5. Testing for optional external libraries.
    6. If a test fails, some features will not be available.
    7. Testing for OpenSSL...
    8. OpenSSL disabled.
    9. Testing for Berkeley DB...
    10. Berkeley DB disabled.
    11. Configuration successful.
    12. Generating makefiles...
    13. Project MESSAGE: building core module
    14. Project MESSAGE: building gui module
    15. Project MESSAGE: building network module
    16. Project MESSAGE: building sql module
    17. Project MESSAGE: building web module
    18. Project MESSAGE: building crypto module
    19. Reading C:/libqxt/libqxt-0.5.0/tools/doqsy/doqsy.pro
    20. Reading C:/libqxt/libqxt-0.5.0/src/core/core.pro
    21. Reading C:/libqxt/libqxt-0.5.0/src/gui/gui.pro
    22. Reading C:/libqxt/libqxt-0.5.0/src/designer/designer.pro
    23. Reading C:/libqxt/libqxt-0.5.0/src/network/network.pro
    24. Reading C:/libqxt/libqxt-0.5.0/src/sql/sql.pro
    25. Reading C:/libqxt/libqxt-0.5.0/src/web/web.pro
    26. Reading C:/libqxt/libqxt-0.5.0/src/crypto/crypto.pro
    27. Makefiles generated. Run mingw32-make now.
    28.  
    29. C:\libqxt\libqxt-0.5.0>mingw32-make
    30. cd tools\doqsy\ && mingw32-make -f Makefile
    31. mingw32-make[1]: Entering directory `C:/libqxt/libqxt-0.5.0/tools/doqsy'
    32. mingw32-make -f Makefile.Debug
    33. Makefile.Debug:60: *** missing separator. Stop.
    34. mingw32-make[2]: Entering directory `C:/libqxt/libqxt-0.5.0/tools/doqsy'
    35. mingw32-make[2]: Leaving directory `C:/libqxt/libqxt-0.5.0/tools/doqsy'
    36. mingw32-make[1]: *** [debug] Error 2
    37. mingw32-make[1]: Leaving directory `C:/libqxt/libqxt-0.5.0/tools/doqsy'
    38. mingw32-make: *** [sub-tools-doqsy-make_default] Error 2
    To copy to clipboard, switch view to plain text mode 

  13. #9
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Global shortcut + other program

    Is the qmake you have in PATH for Qt/MinGW or Qt/MSVC?
    J-P Nurmi

  14. The following user says thank you to jpn for this useful post:

    deemeetar (29th September 2009)

  15. #10
    Join Date
    Jul 2009
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8

    Default Re: Global shortcut + other program

    C:\Qt\4.5.2\qmake

  16. #11
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Global shortcut + other program

    Yes, but is that a MSVC or MinGW installation? You can't mix the two.
    J-P Nurmi

  17. The following user says thank you to jpn for this useful post:

    deemeetar (29th September 2009)

Similar Threads

  1. Segmentation Fault when Program Starts
    By KaptainKarl in forum Newbie
    Replies: 7
    Last Post: 10th September 2009, 08:43
  2. Program crashes on creating new dialog
    By eekhoorn12 in forum Qt Programming
    Replies: 2
    Last Post: 11th June 2009, 11:52
  3. Eclipse Integration and program not starting
    By Cruz in forum Installation and Deployment
    Replies: 1
    Last Post: 16th January 2009, 22:32
  4. Replies: 19
    Last Post: 21st January 2008, 09:13
  5. QT MySQL
    By sabeeshcs in forum Newbie
    Replies: 6
    Last Post: 12th January 2007, 04:19

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.