Search Results

Search found 1295 results on 52 pages for 'hook'.

Page 8/52 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Adding hooks to TortoiseHg

    - by hekevintran
    I am using TortoiseHg and would like to apply a hook to my repo. My repo's .hg/hgrc file is as follows: [hooks] pretxncommit = python:hg_checksize.newbinsize The thing is that I don't know where TortoiseHg's PYTHONPATH variable is set. How do I change it? Or where do I put my Python file so that it is visible by TortoiseHg's Python interpreter? I cannot find any mention of hooks in TortoiseHg's documentation or through Google?

    Read the article

  • drupal module alter view or node

    - by bert
    I have been using hook_alter to modify forms in a custom PHP module. I started to take the same approach modifying the result page of "node add" form. However this page is not a form so I don't have a form ID to hook on to. Actually it contains a login form, but that does not contain the elements that I am looking for, What approach should I use in this situation?

    Read the article

  • hook_user not being called for 'login' operation

    - by Allain Lalonde
    I've read in the drupal documentation that hook_user should be invoked for the login operation. To test this I've added a call to drupal_set_message at the top of my modules hook implementation and the only message I'm receiving is a call with 'load' as the $op. I've confirmed that drupal_set_message can be called multiple times and it doesn't erase the previous message, so I'm confident that hook_user is only being invoked the one time. Any good reasons for why hook_user isn't being invoked with 'login' as an operation when I'm logging in?

    Read the article

  • WinForms: How to prevent textbox from opening alt menu?

    - by Digiku
    I have this textbox I use to capture keyboard shortcuts for a preferences config. I use a low-level keyboard hook to capture keys and also prevent them from taking action, e.g. the Windows key, but the Alt key still comes through and makes my textbox lose focus. How can I block the Alt key, so the focus is kept unaltered at my textbox?

    Read the article

  • Raising event on reading file?

    - by blez
    I have external app reading files, I want to hook that to get event in my app. But I cannot find a sources hooking ReadFile (or something else that can help me achieve that). Any ideas how to do that? It must be done in User-Mode. I was thinking for something similar to Process Monitor. I wonder how it does it..

    Read the article

  • pre-update svn script to filter what get

    - by DrLuk
    Imagine a repository with many kind of files. Then, I want to get from this repository just some kind of files in a "filter process". I mean ALL FILES are versioned. But to my local work, I just wanna i.e get *.php files, ignoring download *.jpg instead. I think about client-site hook script (pre-update). Anyone know if is it possible? Thanks!

    Read the article

  • How to run commands when mac is idle and when it resumes

    - by tig
    I want to run script when my mac is idle (for example after 5 minutes or screen saver start time is also ok) and when I resume it from idle state. I know that I can write daemon using NSDistributedNotificationCenter and com.apple.screenIsLocked and com.apple.screenIsUnlocked, but I hope that there is already solution without creating new daemon. I need this to for example turn on/off speed limit for Transmission (as it is sometimes hard to work when hashing/downloading on full speed).

    Read the article

  • Monitor programs accessing my keyboard?

    - by Anti Earth
    As of a few days ago, my computer is behaving 'erratically'. When I am typing, my pointer will randomly move to another place in the text and start typing a semi-random string of characters. ("gvyfn" is common; It has typed this about 8 times whilst I composed all the text above) It often highlights part of or all the text and overwrites it. It sometimes goes into loops of pressing Control-alt-delete down, bringing up Windows 7 menu thing. It sometimes even messes with mouseclicks; they have unexpected results, like requesting admin priveledges from applications, instead of switching to their window. I believe this is because it is holding a alt-function key down. This behaviour happens periodically, in waves. It might subside for an hour, then continue to haunt me. I believe it to be a virus or malicious program. My anti-virus (Symantec) and multiply MS rootkit removers could not find anything suspicious. I've noticed that sometimes it re-maps keys, and types gibberish when I press certain keys (though no pattern is evident). I believe a malicious program has installed a keyhook on my computer. I'm wondering... - Is there a way to let me view which programs are emulating keystrokes? - Is there a way to view what keyboard hooks are installed? (I'm also at liberty to try any other techniques to remove this blasted thing. It is easily the most fustrating computer problem I've encountered). Thanks!

    Read the article

  • Anything wrong with spamming GC.KeepAlive(KeyboardHookPointer)?

    - by Alex
    GC.KeepAlive() References the specified object, which makes it ineligible for garbage collection from the start of the current routine to the point where this method is called. Not really sure about what GC.KeepAlive does other than simply store a reference so the Garbage Collector doesn't collect the object. But does calling GC.KeepAlive() on an object permanently keep an object from being collected? Or do you have to re-call GC.KeepAlive() every so often (and if so, how often)? I want to keep my keyboard hook alive.

    Read the article

  • How to capture any key in X?

    - by cz-david
    Hi, I am building an application for which I need to periodically get information about users keyboard. It is going to be user idle detection application. I have a fairly simple solution to periodically check if the mouse has been moved. But I can't figure any reasonable non root way to detect if the keyboard has been pressed. I was thinking about registering a hook every timer timeout and on any key press to unregister it. So if there is no key press for a long time then my program will know if the user is idle. Anyway, I couldn't find any global hooks for any key, including modifiers. Is there an easy way to do this? Or would someone have a better way to detect keyboard idleness? Thanks, David Polák

    Read the article

  • How to monitor screen updates?

    - by user299600
    I am trying to write a program that monitors when the screen has been redrawn. Meaning if any part of any window is redrawn, then the program is notified. As far as I understand I should use a journal record hook like at http://www.vbaccelerator.com/home/vb/code/libraries/Hooks/Journal_Record_Hooks/article.asp However, I do not understand which MSG type would get me the WM_PAINT events (WH_CALLWNDPROC and WH_CALLWNDPROCRET do not seem to do the job). I'm not even sure that WM_PAINT is what I'm looking for... Basically, if I knew when the DC associated with GetDesktopWindow() has changed then my problem would be solved. Question is: How do you monitor screen updates?

    Read the article

  • A hooked DirectX 9 program crashes on window resize, texture related.

    - by Ben
    I'm using EasyHook and SlimDX to overlay some graphics using SlimDX's Sprite and Texture classes. When I resize windows some programs fine, but others will crash - Winamp's MilkDrop 2 gives me an ambiguous memory error for example. I expect this is due to the after market Texture I created. The question is what VTable function should I hook and/or how/when do I dispose and recreate the Texture? Reset perhaps? If it isn't obvious I don't know much about DirectX.

    Read the article

  • How to return the handle of a window when we click on it, without any DLL injection?

    - by Doo Dee
    Hello! For one of my projects, I need to create a function that will return a handle to a window when the user click on it (any window displayed on screen, and anywhere inside that window). I know it is possible to use a global hook, but I think there must be a more simple way of doing that, without using any DLL injection. In fact, I could intercept the left mouse click or intercept when a window is activated. Can I use one of those 2 solutions without any DLL injection?

    Read the article

  • Hooking into comment_text() to add surrounding tag

    - by Stefan Glase
    Trying to hook into the function comment_text() supplied by Wordpress API to wrap the output of every comment into a <div>...</div> container I am running into the following problem: Without my added filter the output of comment_text() looks like this: <p>Hello User!</p> <p>Thank you for your comment.</p> <p>Stefan</p> Thats fine but as I said I would like to have it wrapped into a <div class="comment-text">...</div>. As far as I know the correct way doing this would be in adding a filter to functions.php of my theme and so I did: function stefan_wrap_comment_text($content) { return "<div class=\"comment-text\">". $content ."</div>"; } add_filter('comment_text', 'stefan_wrap_comment_text'); As I can see from the output the given filter works but it has a negative sideeffect to the first paragraph of the content as you can see in the following example. The first paragraph should be <p>Hello User!</p> but looks like this: Hello User!. <div class="comment-text"> Hello User! <p>Thank you for your comment.</p> <p>Stefan</p> </div> Any ideas or hints what I am doing wrong?

    Read the article

  • C# How to find if an event is hooked up

    - by Nick
    I want to be able to find out if an event is hooked up or not. I've looked around, but I've only found solutions that involved modifying the internals of the object that contains the event. I don't want to do this. Here is some test code that I thought would work: // Create a new event handler that takes in the function I want to execute when the event fires EventHandler myEventHandler = new EventHandler(myObject_SomeEvent); // Get "p1" number events that got hooked up to myEventHandler int p1 = myEventHandler.GetInvocationList().Length; // Now actually hook an event up myObject.SomeEvent += m_myEventHandler; // Re check "p2" number of events hooked up to myEventHandler int p2 = myEventHandler.GetInvocationList().Length; Unfort the above is dead wrong. I thought that somehow the "invocationList" in myEventHandler would automatically get updated when I hooked an event to it. But no, this is not the case. The length of this always comes back as one. Is there anyway to determine this from outside the object that contains the event?

    Read the article

  • Finding a 3rd party QWidget with injected code & QWidget::find(hwnd)

    - by David Menard
    Hey, I have a Qt Dll wich I inject into a third-party Application using windows detours library: if(!DetourCreateProcessWithDll( Path, NULL, NULL, NULL, TRUE, CREATE_DEFAULT_ERROR_MODE | CREATE_SUSPENDED, NULL, NULL, &si, &pi, "C:\\Program Files\\Microsoft Research\\Detours Express 2.1\\bin\\detoured.dll", "C:\\Users\\Dave\\Documents\\Visual Studio 2008\\Projects\\XOR\\Debug\\XOR.dll", NULL)) and then I set a system-wide hook to intercept window creation: HHOOK h_hook = ::SetWindowsHookEx(WH_CBT, (HOOKPROC)CBTProc, Status::getInstance()->getXORInstance(), 0); Where XOR is my programs name, and Status::getInstance() is a Singleton where I keep globals. In my CBTProc callback, I want to intercept all windows that are QWidgets: HWND hwnd= FindWindow(L"QWidget", NULL); which works well, since I get a corresponding HWND (I checked with Spy++) Then, I want to get a pointer to the QWidget, so I can use its functions: QWidget* q = QWidget::find(hwnd); but here's the problem, the returned pointer is always 0. Am I not injecting my code into the process properly? Or am I not using QWidget::find() as I should? Thanks, Dave EDIT:If i change the QWidget::find() function to an exported function of my DLL, after setting the hooks (so I can set and catch a breakpoint), QWidgetPrivate::mapper is NULL.

    Read the article

  • How to redirect registry access of a dll loaded by my program

    - by dummzeuch
    I have got a dll that I load in my program which reads and writes its settings to the registry (hkcu). My program changes these settings prior to loading the dll so it uses the settings my program wants it to use which works fine. Unfortunately I need to run several instances of my program with different settings for the dll. Now the approach I have used so far no longer works reliably because it is possible for one instance of the program to overwrite the settings that another instance just wrote before the dll has a chance to read them. I haven't got the source of the dll in question and I cannot ask the programmer who wrote it to change it. One idea I had, was to hook registry access functions and redirect them to a different branch of the registry which is specific to the instance of my program (e.g. use the process id as part of the path). I think this should work but maybe you have got a different / more elegant. In case it matters: I am using Delphi 2007 for my program, the dll is probably written in C or C++.

    Read the article

  • Low-level Keyboard Hooks/SendInput with Winkey+L possible? (workstation lockout is intercepted in Vi

    - by Brian Jorgensen
    I work on a project called UAWKS (Unofficial Apple Wireless Keyboard Support) that helps Windows users use Apple's bluetooth keyboard. One of the main goals of UAWKS is to swap the Cmd key (which behaves as Winkey in Windows) with Ctrl, allowing users to do Cmd+C for copy, Cmd+T for new tab, etc. It is currently developed using AutoHotkey, which worked pretty well under Windows XP. However, on Vista and Windows 7, Cmd+L causes problems: Regardless of low-level keyboard hooks, Winkey+L is always intercepted by Windows and normally locks the workstation... You can disable workstation locking with this registry hack, but pressing Winkey+L still can't be rebound in AHK Pressing Winkey+L leaves Winkey in the Keydown state until the next (additional) Winkey Up. Simulating a Keyup event doesn't seem to work either! It seems that Winkey+L is a special chord that messes everything else up. I've looked through the AHK source code, and they try to address this problem in SendKey() in keyboard_mouse.cpp (near line 883 in v1.0.48.05), but it doesn't work. I wrote up my own low-level keyboard hook application in C#, and I see the same problem. Has anyone else run into this? Is there a workaround?

    Read the article

  • emacs: Can I set compilation-error-regexp-alist in a mode hook fn?

    - by Cheeso
    I am trying to set the compilation-error-regexp-alist in a function that I add as a mode hook. (defun cheeso-javascript-mode-fn () (turn-on-font-lock) ...bunch of other stuff ;; for JSLINT (make-local-variable 'compilation-error-regexp-alist) (setq compilation-error-regexp-alist '( ("^[ \t]*\\([A-Za-z.0-9_: \\-]+\\)(\\([0-9]+\\)[,]\\( *[0-9]+\\))\\( Microsoft JScript runtime error\\| JSLINT\\): \\(.+\\)$" 1 2 3) )) ;;(make-local-variable 'compile-command) (setq compile-command (let ((file (file-name-nondirectory buffer-file-name))) (concat "%windir%\\system32\\cscript.exe \\cheeso\\bin\\jslint.js " file))) ) (add-hook 'javascript-mode-hook 'cheeso-javascript-mode-fn) The mode hook runs. The various things I Set in the mode hook work. The compile-command gets set. But for some reason, the compilation-error-regexp-alist value doesn't take effect. If I later do a M-x describe-variable on compilation-error-regexp-alist, it shows me the value I think it should have. But .. the errors in the compilation buffer don't get highlighted, and M-x next-error does not work. If I add the error regexp value to the compilation-error-regexp-alist via setq-default, like this: (setq-default compilation-error-regexp-alist '( ... jslint regexp here ... ... many other regexp's here... )) ...then it works. The errors in the compilation buffer get properly highlighted and M-x next-error functions as expected.

    Read the article

  • Add comment to subversion commit automatically

    - by Paul Alexander
    I've already got my subversion repository set up to require comments of a minimum length to accept a commit. However, I'd like to start tagging those comments with information from our bug tracking system when committed. I've already got the scripts set up to pull data from the bug tracker and just need a way to get that info into the subversion commit comments. How can append to the existing comment in subversion automatically? For reference, the subversion repository is hosted on a linux server with Ubuntu 9 something installed and I have complete root access to the machine.

    Read the article

  • How can I do something ~after~ an event has fired in C#?

    - by Siracuse
    I'm using the following project to handle global keyboard and mouse hooking in my C# application. This project is basically a wrapper around the Win API call SetWindowsHookEx using either the WH_MOUSE_LL or WH_KEYBOARD_LL constants. It also manages certain state and generally makes this kind of hooking pretty pain free. I'm using this for a mouse gesture recognition software I'm working on. Basically, I have it setup so it detects when a global hotkey is pressed down (say CTRL), then the user moves the mouse in the shape of a pre-defined gesture and then releases global hotkey. The event for the KeyDown is processed and tells my program to start recording the mouse locations until it receives the KeyUp event. This is working fine and it allows an easy way for users to enter a mouse-gesture mode. Once the KeyUp event fires and it detects the appropriate gesture, it is suppose to send certain keystrokes to the active window that the user has defined for that particular gesture they just drew. I'm using the SendKeys.Send/SendWait methods to send output to the current window. My problem is this: When the user releases their global hotkey (say CTRL), it fires the KeyUp event. My program takes its recorded mouse points and detects the relevant gesture and attempts to send the correct input via SendKeys. However, because all of this is in the KeyUp event, that global hotkey hasn't finished being processed. So, for example if I defined a gesture to send the key "A" when it is detected, and my global hotkey is CTRL, when it is detected SendKeys will send "A" but while CTRL is still "down". So, instead of just sending A, I'm getting CTRL-A. So, in this example, instead of physically sending the single character "A" it is selecting-all via the CTRL-A shortcut. Even though the user has released the CTRL (global hotkey), it is still being considered down by the system. Once my KeyUp event fires, how can I have my program wait some period of time or for some event so I can be sure that the global hotkey is truly no longer being registered by the system, and only then sending the correct input via SendKeys?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >