Advertisement
Guest User

uClose - automatic way to close uTorrent

a guest
Jan 5th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Compiler http://www.lbbooster.com/
  2.  
  3.    arg$ = lower$(CommandLine$)
  4.     if not(arg$ <> "") then
  5.         print "[error] need the exactly title of the window. E.g. uClose.exe uTorrent 3.3.2"
  6.         end
  7.  
  8.     else
  9.  
  10.         if instr(arg$, "utorrent") then
  11.             arg$ = mid$(arg$, 10, 6)
  12.             result$ = "µTorrent ";arg$
  13.  
  14.         else
  15.  
  16.             print "0"
  17.             end
  18.  
  19.         end if
  20.  
  21.     end if
  22.  
  23.     CallDLL #user32, "FindWindowA",_
  24.         _NULL as ulong,_
  25.         result$ as ptr,_
  26.         ut as ulong
  27.     if ut = 0 then
  28.         print ut
  29.         end
  30.     end if
  31.  
  32.     print "find handle " ; arg$ ; " " ; ut
  33.  
  34.     calldll #user32, "SendMessageA", _
  35.         ut as ulong, _
  36.         _WM_CLOSE as long, _
  37.         result as long
  38.  
  39.     print arg$ ; " " ; ut ; " closed"
  40.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement