quick_hotkey_mzk.py 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. from time import sleep
  2. # from subprocess import check_output
  3. import re
  4. import keyring
  5. # import subprocess as sp
  6. import keyboard as kb
  7. import pyautogui as gui
  8. import pywinctl as gw
  9. from pywinau import automate_write
  10. sleep_ = 0.025
  11. CONF = 0.8
  12. mentor_user = 'Utilizator: Master'
  13. def abbr(short_cut, abbr_message, modifier=''):
  14. shc = short_cut
  15. if shc == ' ':
  16. shc1 = re.findall(' +', shc)
  17. gui.typewrite(abbr_message)
  18. gui.press('left', presses=1, interval=0.001)
  19. gui.press('backspace', presses=1, interval=0.001)
  20. gui.press('right', presses=1, interval=0.001)
  21. else:
  22. shc1 = re.findall('[a-z0-9-]*', shc)
  23. gui.press('backspace', presses=len(''.join(shc1) + modifier), interval=sleep_)
  24. kb.write(abbr_message)
  25. def mv_mouse_right():
  26. size = gui.size()
  27. gui.moveTo(size[0] / 1.01, size[1] / 1.01)
  28. # gui.click()
  29. def mv_mouse_cent():
  30. size = gui.size()
  31. gui.moveTo(size[0] / 2, size[1] / 2)
  32. def _printer(func):
  33. def wrapper():
  34. print(func.__doc__, 'h_key performed')
  35. return func()
  36. return wrapper
  37. def nord():
  38. gui.press('backspace', 2)
  39. gui.typewrite('NN1984ord')
  40. def h_key():
  41. '''mentor list config'''
  42. gui.keyDown('shift')
  43. gui.press('tab', presses=9, interval=sleep_)
  44. gui.keyUp('shift')
  45. sleep(0.5)
  46. gui.press('right', presses=1)
  47. @_printer
  48. def remake_journal():
  49. '''refacere jurnal'''
  50. try:
  51. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  52. active_win = gw.getActiveWindowTitle()
  53. if mentor_user.title() in active_win.title():
  54. # mentor_win.activate()
  55. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/contabile.png', confidence=CONF)
  56. sleep(0.1)
  57. if butt_x_y:
  58. gui.click(butt_x_y[0], butt_x_y[1])
  59. pos_x_y = gui.position()
  60. gui.moveTo(pos_x_y[0], pos_x_y[1])
  61. gui.press('enter')
  62. mv_mouse_cent()
  63. # gui.move(1, 1)
  64. except IndexError:
  65. print('start mentor')
  66. @_printer
  67. def cash_registry():
  68. '''registru de casa'''
  69. try:
  70. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  71. active_win = gw.getActiveWindowTitle()
  72. if mentor_user.title() in active_win.title():
  73. # mentor_win.activate()
  74. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/trezorerie.png', confidence=CONF)
  75. sleep(0.1)
  76. if butt_x_y:
  77. gui.click(butt_x_y[0], butt_x_y[1])
  78. pos_x_y = gui.position()
  79. gui.moveTo(pos_x_y[0], pos_x_y[1])
  80. gui.press('right', 1, sleep_)
  81. gui.press('down', 1, sleep_)
  82. gui.press('return', 1, sleep_)
  83. mv_mouse_cent()
  84. # print('please activate Window LISTE')
  85. except IndexError:
  86. print('start mentor')
  87. @_printer
  88. def clients_ron():
  89. '''clienti datornici'''
  90. try:
  91. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  92. active_win = gw.getActiveWindowTitle()
  93. if mentor_user.title() in active_win.title():
  94. # mentor_win.activate()
  95. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/parteneri.png', confidence=CONF)
  96. sleep(0.1)
  97. if butt_x_y:
  98. gui.click(butt_x_y[0], butt_x_y[1])
  99. pos_x_y = gui.position()
  100. gui.moveTo(pos_x_y[0], pos_x_y[1])
  101. gui.press('right', 1, sleep_)
  102. gui.press('down', 11, 0.0)
  103. gui.press('return', 2, sleep_)
  104. mv_mouse_cent()
  105. except IndexError:
  106. print('start mentor')
  107. @_printer
  108. def verif_balance():
  109. '''balanta de verificare'''
  110. try:
  111. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  112. active_win = gw.getActiveWindowTitle()
  113. if mentor_user.title() in active_win.title():
  114. # mentor_win.activate()
  115. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/contabile.png', confidence=CONF)
  116. sleep(0.1)
  117. if butt_x_y:
  118. gui.click(butt_x_y[0], butt_x_y[1])
  119. pos_x_y = gui.position()
  120. gui.moveTo(pos_x_y[0], pos_x_y[1])
  121. gui.press('down', 1, sleep_)
  122. gui.press('right', 1, sleep_)
  123. gui.press('down', 1, sleep_)
  124. gui.press('return', 2, sleep_)
  125. mv_mouse_cent()
  126. except IndexError:
  127. print('start mentor')
  128. @_printer
  129. def suppliers_ron():
  130. '''furnizori neachitati'''
  131. try:
  132. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  133. active_win = gw.getActiveWindowTitle()
  134. if mentor_user.title() in active_win.title():
  135. # mentor_win.activate()
  136. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/parteneri.png', confidence=CONF)
  137. sleep(0.1)
  138. if butt_x_y:
  139. gui.click(butt_x_y[0], butt_x_y[1])
  140. pos_x_y = gui.position()
  141. gui.moveTo(pos_x_y[0], pos_x_y[1])
  142. gui.press('down', 1, sleep_)
  143. gui.press('right', 1, sleep_)
  144. gui.press('down', 9, 0.0)
  145. gui.press('return', 2, sleep_)
  146. mv_mouse_cent()
  147. except IndexError:
  148. print('start mentor')
  149. @_printer
  150. def suppliers_val():
  151. '''furnizori neachitati eur'''
  152. try:
  153. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  154. active_win = gw.getActiveWindowTitle()
  155. if mentor_user.title() in active_win.title():
  156. # mentor_win.activate()
  157. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/parteneri.png', confidence=CONF)
  158. sleep(0.1)
  159. if butt_x_y:
  160. gui.click(butt_x_y[0], butt_x_y[1])
  161. pos_x_y = gui.position()
  162. gui.moveTo(pos_x_y[0], pos_x_y[1])
  163. gui.press('down', 1, sleep_)
  164. gui.press('right', 1, sleep_)
  165. gui.press('down', 10, 0.0)
  166. gui.press('return', 2, sleep_)
  167. mv_mouse_cent()
  168. except IndexError:
  169. print('start mentor')
  170. @_printer
  171. def bank_registry_ron():
  172. '''registru de banca lei'''
  173. try:
  174. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  175. active_win = gw.getActiveWindowTitle()
  176. if mentor_user.title() in active_win.title():
  177. # mentor_win.activate()
  178. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/trezorerie.png', confidence=CONF)
  179. sleep(0.1)
  180. if butt_x_y:
  181. gui.click(butt_x_y[0], butt_x_y[1])
  182. pos_x_y = gui.position()
  183. gui.moveTo(pos_x_y[0], pos_x_y[1])
  184. gui.press('down', 4, sleep_)
  185. gui.press('return', 1, sleep_)
  186. mv_mouse_cent()
  187. except IndexError:
  188. print('start mentor')
  189. @_printer
  190. def h_key12():
  191. '''registru de banca'''
  192. # _date_ = gui.getWindow('LISTE - ')
  193. try:
  194. sleep(sleep_)
  195. act_win = gw.getActiveWindow()
  196. # dummy = gw.getWindowsWithTitle('MENTOR')[0]
  197. if mentor_user in act_win.title:
  198. mv_mouse_right()
  199. kb.press_and_release('ctrl+f10')
  200. # gui.press('f10')
  201. gui.press('right', 3, sleep_)
  202. gui.press('down', 1, 0.0)
  203. gui.press('down', 6, 0.0)
  204. gui.press('return', 1, sleep_)
  205. except IndexError:
  206. print('please activate Window LISTE')
  207. @_printer
  208. def bank_registry_val():
  209. '''registru de banca val'''
  210. try:
  211. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  212. active_win = gw.getActiveWindowTitle()
  213. if mentor_user.title() in active_win.title():
  214. # mentor_win.activate()
  215. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/trezorerie.png', confidence=CONF)
  216. sleep(0.1)
  217. if butt_x_y:
  218. gui.click(butt_x_y[0], butt_x_y[1])
  219. pos_x_y = gui.position()
  220. gui.moveTo(pos_x_y[0], pos_x_y[1])
  221. gui.press('down', 6, 0.0)
  222. gui.press('return', 1, sleep_)
  223. mv_mouse_cent()
  224. except IndexError:
  225. print('start mentor')
  226. def close_all_lists():
  227. '''inchide toate ferestrele'''
  228. try:
  229. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  230. active_win = gw.getActiveWindowTitle()
  231. if mentor_user.title() in active_win.title():
  232. # mentor_win.activate()
  233. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/inchidere.png', confidence=CONF)
  234. sleep(0.1)
  235. if butt_x_y:
  236. gui.click(butt_x_y[0], butt_x_y[1])
  237. pos_x_y = gui.position()
  238. gui.moveTo(pos_x_y[0], pos_x_y[1])
  239. mv_mouse_cent()
  240. except IndexError:
  241. pass
  242. def close_list():
  243. '''inchide fereastra'''
  244. try:
  245. # mentor_win = gw.getWindowsWithTitle(mentor_user, condition=gw.Re.CONTAINS)[0]
  246. active_win = gw.getActiveWindowTitle()
  247. if mentor_user.title() in active_win.title():
  248. # # # mentor_win.activate()
  249. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/close.png', confidence=CONF)
  250. sleep(0.1)
  251. if butt_x_y:
  252. gui.click(butt_x_y[0], butt_x_y[1])
  253. pos_x_y = gui.position()
  254. gui.moveTo(pos_x_y[0], pos_x_y[1])
  255. mv_mouse_cent()
  256. except IndexError:
  257. print('activate mentor')
  258. @_printer
  259. def product_details():
  260. '''fisa de magazie'''
  261. # _date_ = gui.getWindow('LISTE - ')
  262. try:
  263. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  264. active_win = gw.getActiveWindowTitle()
  265. if mentor_user.title() in active_win.title():
  266. # mentor_win.activate()
  267. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/stocuri.png', confidence=CONF)
  268. sleep(0.1)
  269. if butt_x_y:
  270. gui.click(butt_x_y[0], butt_x_y[1])
  271. pos_x_y = gui.position()
  272. gui.moveTo(pos_x_y[0], pos_x_y[1])
  273. gui.press('right', 1, sleep_)
  274. gui.press('return', 1, sleep_)
  275. mv_mouse_cent()
  276. except IndexError:
  277. print('start mentor')
  278. @_printer
  279. def h_key14():
  280. '''inventar centralizat'''
  281. # _date_ = gui.getWindow('LISTE - ')
  282. try:
  283. sleep(sleep_)
  284. act_win = gw.getActiveWindow()
  285. # dummy = gw.getWindowsWithTitle('MENTOR')[0]
  286. if mentor_user in act_win.title:
  287. mv_mouse_right()
  288. kb.press_and_release('ctrl+f10')
  289. # gui.press('f10')
  290. gui.press('right', 1, sleep_)
  291. gui.press('down', 1, 0.0)
  292. gui.press('down', 8, 0.0)
  293. gui.press('right', 1, sleep_)
  294. gui.press('down', 7, 0.0)
  295. gui.press('return', 1, sleep_)
  296. except IndexError:
  297. print('please activate Window LISTE')
  298. @_printer
  299. def stocks():
  300. '''stocuri pe gestiuni'''
  301. try:
  302. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  303. active_win = gw.getActiveWindowTitle()
  304. if mentor_user.title() in active_win.title():
  305. # mentor_win.activate()
  306. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/stocuri.png', confidence=CONF)
  307. sleep(0.1)
  308. if butt_x_y:
  309. gui.click(butt_x_y[0], butt_x_y[1])
  310. pos_x_y = gui.position()
  311. gui.moveTo(pos_x_y[0], pos_x_y[1])
  312. gui.press('down', 8, 0.0)
  313. gui.press('return', 1, sleep_)
  314. mv_mouse_cent()
  315. except IndexError:
  316. print('start mentor')
  317. @_printer
  318. def h_key16():
  319. '''stocuri la terti'''
  320. # _date_ = gui.getWindow('LISTE - ')
  321. try:
  322. sleep(sleep_)
  323. act_win = gw.getActiveWindow()
  324. # dummy = gw.getWindowsWithTitle('MENTOR')[0]
  325. if mentor_user in act_win.title:
  326. mv_mouse_right()
  327. kb.press_and_release('ctrl+f10')
  328. # gui.press('f10')
  329. gui.press('right', 1, sleep_)
  330. gui.press('down', 1, 0.0)
  331. gui.press('down', 12, 0.0)
  332. gui.press('right', 1, sleep_)
  333. gui.press('return', 1, sleep_)
  334. except IndexError:
  335. print('please activate Window LISTE')
  336. @_printer
  337. def account_details():
  338. '''fisa de cont'''
  339. try:
  340. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  341. active_win = gw.getActiveWindowTitle()
  342. if mentor_user.title() in active_win.title():
  343. # mentor_win.activate()
  344. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/contabile.png', confidence=CONF)
  345. sleep(0.1)
  346. if butt_x_y:
  347. gui.click(butt_x_y[0], butt_x_y[1])
  348. pos_x_y = gui.position()
  349. gui.moveTo(pos_x_y[0], pos_x_y[1])
  350. gui.press('down', 6, 0.0)
  351. gui.press('return', 1, sleep_)
  352. mv_mouse_cent()
  353. except IndexError:
  354. print('start mentor')
  355. @_printer
  356. def partner_balance():
  357. '''fisa partener'''
  358. try:
  359. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  360. active_win = gw.getActiveWindowTitle()
  361. if mentor_user.title() in active_win.title():
  362. # mentor_win.activate()
  363. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/parteneri.png', confidence=CONF)
  364. sleep(0.1)
  365. if butt_x_y:
  366. gui.click(butt_x_y[0], butt_x_y[1])
  367. pos_x_y = gui.position()
  368. gui.moveTo(pos_x_y[0], pos_x_y[1])
  369. gui.press('down', 1, 0.0)
  370. gui.press('down', 8, 0.0)
  371. gui.press('return', 2, sleep_)
  372. mv_mouse_cent()
  373. except IndexError:
  374. print('start mentor')
  375. @_printer
  376. def salary():
  377. '''stat de plata'''
  378. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  379. active_win = gw.getActiveWindowTitle()
  380. if mentor_user.title() in active_win.title():
  381. # mentor_win.activate()
  382. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/salarii.png', confidence=CONF)
  383. sleep(0.1)
  384. if butt_x_y:
  385. gui.click(butt_x_y[0], butt_x_y[1])
  386. pos_x_y = gui.position()
  387. gui.moveTo(pos_x_y[0], pos_x_y[1])
  388. gui.press('down', 1, sleep_)
  389. gui.press('right', 1, sleep_)
  390. gui.press('down', 3, sleep_)
  391. gui.press('return', 1, sleep_)
  392. mv_mouse_cent()
  393. # gui.move(1, 1)
  394. @_printer
  395. def sinteza():
  396. '''contr. sinteza'''
  397. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  398. active_win = gw.getActiveWindowTitle()
  399. if mentor_user.title() in active_win.title():
  400. # mentor_win.activate()
  401. butt_x_y = gui.locateCenterOnScreen(f'mentor_imgs/salarii.png', confidence=CONF)
  402. sleep(0.1)
  403. if butt_x_y:
  404. gui.click(butt_x_y[0], butt_x_y[1])
  405. pos_x_y = gui.position()
  406. gui.moveTo(pos_x_y[0], pos_x_y[1])
  407. gui.press('down', 19, 0.0)
  408. gui.press('right', 1, sleep_)
  409. gui.press('return', 1, sleep_)
  410. mv_mouse_cent()
  411. # gui.move(1, 1)
  412. @_printer
  413. def mod_salary():
  414. '''mudul salarii'''
  415. # mentor_win = gw.getWindowsWithTitle(mentor_user)[0]
  416. active_win = gw.getActiveWindowTitle()
  417. if mentor_user.title() in active_win.title():
  418. # mentor_win.activate()
  419. butt_x_y_1 = gui.locateCenterOnScreen(f'mentor_imgs/modul_salarii.png', confidence=CONF)
  420. butt_x_y_2 = gui.locateCenterOnScreen(f'mentor_imgs/modul_mentor.png', confidence=CONF)
  421. sleep(0.01)
  422. if butt_x_y_1:
  423. gui.click(butt_x_y_1[0], butt_x_y_1[1])
  424. pos_x_y = gui.position()
  425. gui.moveTo(pos_x_y[0], pos_x_y[1])
  426. elif butt_x_y_2:
  427. gui.click(butt_x_y_2[0], butt_x_y_2[1])
  428. pos_x_y = gui.position()
  429. gui.moveTo(pos_x_y[0], pos_x_y[1])
  430. mv_mouse_cent()
  431. @_printer
  432. def h_key19():
  433. '''service structuri'''
  434. try:
  435. sleep(sleep_)
  436. declaratii = gw.getWindowsWithTitle('utilizator: master')[0]
  437. if declaratii.title in gw.getActiveWindowTitle():
  438. mv_mouse_right()
  439. kb.press_and_release('control+f10')
  440. gui.press('down', 1, sleep_)
  441. gui.press('return', 1, sleep_)
  442. except IndexError:
  443. print('please activate Window LISTE')
  444. @_printer
  445. def h_key20():
  446. '''vector d100'''
  447. try:
  448. sleep(sleep_)
  449. declaratii = gw.getWindowsWithTitle('utilizator: master')[0]
  450. if declaratii.title in gw.getActiveWindowTitle():
  451. mv_mouse_right()
  452. kb.press_and_release('control+f10')
  453. gui.press('right', 1, sleep_)
  454. gui.press('down', 1, sleep_)
  455. gui.press('return', 1, sleep_)
  456. except IndexError:
  457. print('please activate Window LISTE')
  458. # ---> register shortcuts for winmentor
  459. # temporary disabled until found new way (ciel vs. mentor)
  460. # -------------------------------------------------------------------------------
  461. def main():
  462. '''quick_hotkey_mzk'''
  463. # ---> register shortcuts for winmentor
  464. kb.register_hotkey('`+r+j', remake_journal, args=()) # refacere jurnal
  465. kb.register_hotkey('`+r+c', cash_registry, args=()) # casa
  466. kb.register_hotkey('`+c+z', clients_ron, args=()) # clienti
  467. kb.register_hotkey('`+b+v', verif_balance, args=()) # balanta verificare
  468. kb.register_hotkey('`+r+f', suppliers_ron, args=()) # ron furnizori
  469. kb.register_hotkey('`+d+f', suppliers_val, args=()) # deviza furnizori
  470. kb.register_hotkey('`+r+b', bank_registry_ron, args=()) # jurnal banca
  471. kb.register_hotkey('`+j+v', bank_registry_val, args=()) # jurnal banca valuta
  472. kb.register_hotkey('`+s+m', product_details, args=()) # stoc fisa magazie
  473. # kb.register_hotkey('`+s+c', h_key14, args=()) # stoc centralizat
  474. kb.register_hotkey('`+c+s', sinteza, args=()) # contributii sinteza
  475. kb.register_hotkey('`+s+g', stocks, args=()) # stoc gestiuni
  476. kb.register_hotkey('`+s+t', h_key16, args=()) # stoc terti
  477. kb.register_hotkey('`+f+x', account_details, args=()) # fisa cont
  478. kb.register_hotkey('`+f+t', partner_balance, args=()) # fisa terti
  479. kb.register_hotkey('control+q', close_all_lists, args=()) # close all lists
  480. kb.register_hotkey('control+e', close_list, args=()) # close all lists
  481. kb.register_hotkey('`+s+p', salary, args=()) # stat de plata
  482. # kb.register_hotkey('`+q', h_key19(), args=()) # service structuri
  483. # kb.register_hotkey('`+w', h_key20(), args=()) # vector d100
  484. # ---> register shortcuts for users
  485. kb.register_hotkey('`+l', abbr, args=('`+l', r'EV1984nc-', '`'))
  486. kb.register_hotkey('c+l+a', abbr, args=('c+l+a', r'claudia.conta.ab@gmail.com'))
  487. kb.register_hotkey('v+d+e', abbr, args=('v+d+e', r'deeejas@gmail.com'))
  488. kb.register_hotkey('`+v+c', abbr, args=('`+v+c', r'ab6110398', '`'))
  489. kb.register_hotkey('`+v+d', abbr, args=('`+v+d', r'CV1984nc', '`'))
  490. kb.register_hotkey('`+p', abbr, args=('`+p', r'111555', '`'))
  491. # kb.register_hotkey('`+m+p', abbr, args=('`+m+p', r'mozaiq', '`'))
  492. kb.register_hotkey('`+r+p', abbr, args=('`+r+p', r'C0nsu1t1ng', '`'))
  493. # kb.add_hotkey('alt+win+2', lambda: sp.run('C:/Users/Levi/eclipse-workspace-2/vpn/win2016.rdp', shell=True))
  494. # kb.add_hotkey('alt+win+3', lambda: sp.run('C:/Users/Levi/eclipse-workspace-2/vpn/abcons-vnc.rdp', shell=True))
  495. # kb.add_hotkey('alt+win+4', lambda: sp.run('C:/Users/Levi/eclipse-workspace-2/vpn/AbCons_WIN10.bat', shell=True))
  496. # kb.add_hotkey('alt+win+5', lambda: sp.run('C:/Users/Levi/eclipse-workspace-2/vpn/FER_WIN_SERV.vnc', shell=True))
  497. kb.add_abbreviation('inc', 'incasat')
  498. kb.add_abbreviation('dee', 'deeejas@gmail.com')
  499. kb.add_abbreviation('lev', 'levente.marton@mzk.ro')
  500. kb.add_abbreviation('np', 'NN1984ord')
  501. passw = keyring.get_password('passman', 'deeejas@gmail.com')
  502. kb.add_abbreviation('bitw', passw)
  503. kb.add_abbreviation('mnt', 'mozaiq')
  504. kb.register_hotkey('`+9', mod_salary, args=()) # modul salarii
  505. kb.register_hotkey('alt+w', automate_write)
  506. # ---> block the program
  507. # kb.wait()
  508. # kb.register_hotkey('shift+space', abbr, args=(' ', '_'))
  509. # kb.register_hotkey('`+u', abbr, args=('`+u', r'mozaik129Mzk', '`'))
  510. # kb.register_hotkey('control+shift+0', enclose_pharenteses, args=())
  511. # kb.register_hotkey('control+shift+]', enclose_list, args=())
  512. # kb.register_hotkey('control+shift+`', enclose_dict, args=())
  513. # kb.register_hotkey('control+k', indent_comment, args=())
  514. if __name__ == '__main__':
  515. main()