I want to reprograme my wirelss mouse so that it shall generate a nudge if it is on and inactive for 30s, is this possible?
That's madness. If you're using Windows then try this:

set wsc = CreateObject("WScript.Shell")
Do
    WScript.Sleep(5*60*1000)    'Every 5 minutes ...
    wsc.SendKeys("{F13}")       '... press the F13 key.
Loop


Save it in nosleep.vbs on your Desktop and run it when required. F13 is chosen so that it doesn't interfere with anything else.

To check if it's running:


Open Task Manager (Ctrl-Shift-Esc) and go to Details tab. 
If a VBScript or JScript is running, the process wscript.exe or cscript.exe would appear in the list. -
Right-click on the column header and enable "Command Line". This should tell you which script file is being executed.