以上为机器翻译结果,长、整句建议使用 人工翻译 。
"] 164 | 165 | ; yd_html_file.Write(final_html_body_str) 166 | ; yd_html_file.Close() 167 | 168 | rm_str_start_arr := ["" lang("Original Page") "" 204 | ; Gui, __Webapp_:Add, Link,, % s 205 | 206 | Gui __Webapp_:Add, ActiveX, v__Webapp_wb w%__Webapp_Width% h%__Webapp_height%, Shell.Explorer 207 | __Webapp_wb.silent := true ;Surpress JS Error boxes 208 | 209 | ; st := GetCurSelectedText() 210 | ; if !st 211 | ; return 212 | ; ; m(st) 213 | ; url := "https://www.youdao.com/w/" . UriEncode(Trim(st)) 214 | ; __Webapp_wb.Navigate(url) 215 | 216 | __Webapp_wb.Navigate("file://" . GetFullPathName(TEMP_TRANS_WEBAPP_GUI_HTML_HTML)) 217 | 218 | ;Wait for IE to load the page, before we connect the event handlers 219 | ; while __Webapp_wb.readystate != 4 or __Webapp_wb.busy 220 | ; sleep 10 221 | ;Use DOM access just like javascript! 222 | ; MyButton1 := wb.document.getElementById("MyButton1") 223 | ; MyButton2 := wb.document.getElementById("MyButton2") 224 | ; MyButton3 := wb.document.getElementById("MyButton3") 225 | ; ComObjConnect(MyButton1, "MyButton1_") ;connect button events 226 | ; ComObjConnect(MyButton2, "MyButton2_") 227 | ; ComObjConnect(MyButton3, "MyButton3_") 228 | 229 | xMidScrn := GetMouseMonitorMidX() 230 | xMidScrn -= __Webapp_Width / 2 231 | Gui __Webapp_:Show, x%xMidScrn% w%__Webapp_Width% h%__Webapp_height%, %__Webapp_Name% 232 | ; Gui __Webapp_:Default 233 | } 234 | else { 235 | ; m("xxd") 236 | ; handle_webapp_gui_req_failed() 237 | } 238 | webapp_gui_http_req = 239 | } 240 | 241 | __Webapp_GuiEscape: 242 | __Webapp_GuiClose: 243 | ;make sure taskbar is back on exit 244 | WinShow, ahk_class Shell_TrayWnd 245 | WinShow, Start ahk_class Button 246 | Gui __Webapp_:Destroy 247 | return 248 | 249 | 250 | 251 | ; ////////////////////////////////////////////////////////////////////////// 252 | SUB_TRANSLATION_FILE_END_LABEL: 253 | temp_trans := "blabla" -------------------------------------------------------------------------------- /source/tray_menu.ahk: -------------------------------------------------------------------------------- 1 | 2 | if(A_ScriptName=="tray_menu.ahk") { 3 | ExitApp 4 | } 5 | 6 | ; with this label, you can include this file on top of the file 7 | Goto, SUB_TRAY_MENU_FILE_END_LABEL 8 | 9 | 10 | #Include %A_ScriptDir%\source\sux_core.ahk 11 | #Include %A_ScriptDir%\source\action.ahk 12 | 13 | 14 | 15 | class TrayMenu 16 | { 17 | static ASSET_DIR := "app_data\img\" 18 | static icon_default := TrayMenu.ASSET_DIR "sux_default.ico" 19 | static icon_disable := TrayMenu.ASSET_DIR "sux_disable.ico" 20 | static donate_img_alipay := TrayMenu.ASSET_DIR "donate_alipay.png" 21 | static donate_img_wechat := TrayMenu.ASSET_DIR "donate_wechat.png" 22 | static last_tray_icon_x := 0 23 | static last_tray_icon_y := 0 24 | 25 | init() 26 | { 27 | this.SetLang("config") 28 | this.update_tray_menu() 29 | ; this.SetAutorun("config") 30 | this.SetTheme("config") 31 | this.SetHotCorner("config") 32 | this.SetLimitModeInFullScreen("config") 33 | this.SetDisableWin10AutoUpdate("config") 34 | this.SetSwapWinCtrlShiftAlt("config") 35 | this.SetWindowMover("config", 1) 36 | ; this.SetCheckUpdatesOnStartup("config", 1) 37 | } 38 | 39 | SetCheckUpdatesOnStartup(act="toggle", from_launch=0) 40 | { 41 | global INI_SET_CHECK_UPDATES_ON_STARTUP_SWITCH 42 | cfg := SuxCore.GetIniConfig(INI_SET_CHECK_UPDATES_ON_STARTUP_SWITCH, SuxCore.Default_check_updates_on_startup_switch) 43 | switch := (act="config")? cfg : act 44 | switch := (act="toggle")? !cfg : switch 45 | SuxCore.SetIniConfig(INI_SET_CHECK_UPDATES_ON_STARTUP_SWITCH, switch) 46 | if (switch && from_launch) { 47 | check_update_from_launch() 48 | } 49 | } 50 | 51 | SetSwapWinCtrlShiftAlt(act="toggle") 52 | { 53 | global INI_SWAP_WIN_CTRL_SHIFT_ALT 54 | cfg := SuxCore.GetIniConfig(INI_SWAP_WIN_CTRL_SHIFT_ALT, SuxCore.Default_swap_win_ctrl_shift_alt_switch) 55 | switch := (act="config")? cfg : act 56 | switch := (act="toggle")? !cfg : switch 57 | SuxCore.SetIniConfig(INI_SWAP_WIN_CTRL_SHIFT_ALT, switch) 58 | SuxCore.SetCurrentSwapWinCtrlShiftAltSwitch(switch) 59 | } 60 | 61 | SetDisableWin10AutoUpdate(act="toggle") 62 | { 63 | global INI_DISABLE_WIN10_AUTO_UPDATE_SWITCH 64 | cfg := SuxCore.GetIniConfig(INI_DISABLE_WIN10_AUTO_UPDATE_SWITCH, SuxCore.Default_disable_win10_auto_update_switch) 65 | switch := (act="config")? cfg : act 66 | switch := (act="toggle")? !cfg : switch 67 | SuxCore.SetIniConfig(INI_DISABLE_WIN10_AUTO_UPDATE_SWITCH, switch) 68 | if (switch) { 69 | DisableWin10AutoUpdate() 70 | SetTimer, DisableWin10AutoUpdate, %tick_disable_win10_auto_interval% 71 | } 72 | else { 73 | SetTimer, DisableWin10AutoUpdate, Delete 74 | EnableWin10AutoUpdate() 75 | } 76 | } 77 | 78 | SetWindowMover(act="toggle", from_launch=0) 79 | { 80 | SysGet, mon_cnt, MonitorCount 81 | if (mon_cnt get_version_sum(SuxCore.version)) { 201 | check_update_menu_name := lang("A New Version v") remote_ver_str . " !" lang(" Click me to chekc it out!") 202 | ; check_update_menu_func := SuxCore.remote_download_html 203 | check_update_menu_func := "TrayMenu.ShowNewVerReleaseNote" 204 | } 205 | else { 206 | check_update_menu_name := lang("Check Update") 207 | check_update_menu_func := "check_update_from_tray" 208 | } 209 | lang := SuxCore.CurrentLang 210 | cur_theme := SuxCore.GetIniConfig(INI_THEME, SuxCore.Default_theme) 211 | hot_corner_switch := SuxCore.GetIniConfig(INI_HOT_CORNER, SuxCore.Default_hot_corner_switch) 212 | limit_mode_in_full_screen_switch := SuxCore.GetIniConfig(INI_LIMIT_MODE_IN_FULL_SCREEN, SuxCore.Default_limit_mode_in_full_screen_switch) 213 | disable_win10_auto_update_switch := SuxCore.GetIniConfig(INI_DISABLE_WIN10_AUTO_UPDATE_SWITCH, SuxCore.Default_disable_win10_auto_update_switch) 214 | swap_win_ctrl_shift_alt_switch := SuxCore.GetIniConfig(INI_SWAP_WIN_CTRL_SHIFT_ALT, SuxCore.Default_swap_win_ctrl_shift_alt_switch) 215 | window_mover_switch := SuxCore.GetIniConfig(INI_WINDOW_MOVER_SWITCH, SuxCore.Default_window_mover_switch) 216 | 217 | Menu, Tray, Tip, % SuxCore.ProgramName 218 | xMenu.New("TrayLanguage" 219 | ,[["中文", "TrayMenu.SetLang", {"check": lang=="cn"}] 220 | , ["English", "TrayMenu.SetLang", {"check": lang=="en"}]]) 221 | xMenu.New("SearchGuiTheme" 222 | ,[[lang("Auto"), "TrayMenu.SetTheme", {"check": cur_theme=="auto"}] 223 | , [lang("Light"), "TrayMenu.SetTheme", {"check": cur_theme=="light"}] 224 | , [lang("Dark"), "TrayMenu.SetTheme", {"check": cur_theme=="dark"}]]) 225 | 226 | SysGet, mon_cnt, MonitorCount 227 | xMenu.New("SensitiveFeatureSwitch", [[lang("Auto Disable sux In Full Screen"), "TrayMenu.SetLimitModeInFullScreen", {"check": limit_mode_in_full_screen_switch==1}] 228 | , [lang("Hot Corner"), "TrayMenu.SetHotCorner", {"check": hot_corner_switch==1}] 229 | , [lang("Disable Win10 Auto Update"), "TrayMenu.SetDisableWin10AutoUpdate", {"check": disable_win10_auto_update_switch==1}] 230 | , [lang("Swap Win/Ctrl Shift/Alt (beta)"), "TrayMenu.SetSwapWinCtrlShiftAlt", {"check": swap_win_ctrl_shift_alt_switch==1}] 231 | , [lang("Window Mover"), "TrayMenu.SetWindowMover", mon_cnt==1 ? {"disable": 1}: {"check": window_mover_switch==1}]]) 232 | 233 | TrayMenuList := [] 234 | TrayMenuList := EnhancedArray.merge(TrayMenuList 235 | ,[[version_str, "TrayMenu.AboutSux"] 236 | ,[lang("Help"), SuxCore.help_addr] 237 | ,[lang("Donate"), "TrayMenu.ShowDonatePic"] 238 | ,[check_update_menu_name, check_update_menu_func] 239 | ,[] 240 | ,[lang("Start With Windows"), "TrayMenu.SetAutorun", {"check": autorun}] 241 | ; ,[lang("Check Updates On Startup"), "TrayMenu.SetCheckUpdatesOnStartup", {"check": check_updates_on_startup_switch}] 242 | ,["Language",, {"sub": "TrayLanguage"}] 243 | ,[lang("Theme"),, {"sub": "SearchGuiTheme"}] 244 | ,[lang("Feature Switch"),, {"sub": "SensitiveFeatureSwitch"}] 245 | ,[] 246 | ,[lang("Open sux Folder"), "TrayMenu.OpenSuxFolder"] 247 | ,[lang("Edit Config File"), "TrayMenu.Edit_conf"] 248 | ,[] 249 | ,[lang("Disable"), "TrayMenu.SetDisable", {"check": A_IsPaused&&A_IsSuspended}] 250 | ,[lang("Restart sux"), "ReloadSux"] 251 | ,[lang("Exit"), "TrayMenu.ExitSux"] ]) 252 | this.SetMenu(TrayMenuList) 253 | Menu, Tray, Default, % lang("Disable") 254 | Menu, Tray, Click, 1 255 | ; OnMessage(0x404, "AHK_NOTIFYICON") 256 | this.Update_Icon() 257 | } 258 | 259 | static _switch_tray_standard_menu := 0 260 | Standard_Tray_Menu(act="toggle") 261 | { 262 | SuxCore._switch_tray_standard_menu := (act="toggle")? !SuxCore._switch_tray_standard_menu :act 263 | this.update_tray_menu() 264 | } 265 | 266 | ShowNewVerReleaseNote() { 267 | Gui, new_ver_release_note: New 268 | Gui new_ver_release_note:+Resize +AlwaysOnTop +MinSize400 -MaximizeBox -MinimizeBox 269 | Gui, new_ver_release_note:Font, s16 270 | 271 | s := lang("New Release") . "! sux v" . SuxCore.get_remote_ini_config("ver") 272 | Gui, new_ver_release_note:Add, Text,, % s 273 | s := lang("What's new?") 274 | Gui, new_ver_release_note:Add, Text,, % s 275 | 276 | Gui, new_ver_release_note:Font, s11 277 | remote_ver_release_note_str := lang(SuxCore.get_remote_ini_config("release_note_" . SuxCore.CurrentLang)) 278 | _arr := StrSplit(remote_ver_release_note_str, "-") 279 | for _i, _s in _arr { 280 | if (!_s) 281 | Continue 282 | Gui, new_ver_release_note:Add, Text,, % "- " . lang(_s) 283 | } 284 | 285 | s := "" lang("Download Page") "" 286 | Gui, new_ver_release_note:Add, Link,, % s 287 | Gui, new_ver_release_note:Add, Text 288 | GuiControl, Focus, Close 289 | s := lang("New Release") 290 | Gui, new_ver_release_note:Show,, % s 291 | } 292 | 293 | ShowDonatePic() { 294 | Gui, sux_donate: New 295 | Gui sux_donate: +AlwaysOnTop 296 | Gui, sux_donate:Font, s11 wbold 297 | Gui, sux_donate:Add, Text 298 | s := lang("Donate") 299 | Gui, sux_donate:Add, Text,, % s 300 | Gui, sux_donate:Add, Text 301 | 302 | Gui, sux_donate:Font, s10 wnorm 303 | s := lang("Alipay") 304 | Gui, sux_donate:Add, Text,, % s 305 | Gui, sux_donate:Add, Picture, w300 h-1, % TrayMenu.donate_img_alipay 306 | ; Gui, sux_donate:Add, Picture, w300 h-1, C:\Users\b\Documents\github\sux\app_data\donate_alipay.png 307 | Gui, sux_donate:Add, Text 308 | s := lang("Wechat") 309 | Gui, sux_donate:Add, Text,, % s 310 | Gui, sux_donate:Add, Picture, w300 h-1, % TrayMenu.donate_img_wechat 311 | Gui, sux_donate:Add, Text 312 | GuiControl, Focus, Close 313 | s := "sux" 314 | Gui, sux_donate:Show, w330, % s 315 | } 316 | 317 | AboutSux() { 318 | Gui, sux_About: New 319 | Gui sux_About:+Resize +AlwaysOnTop +MinSize400 -MaximizeBox -MinimizeBox 320 | Gui, sux_About:Font, s12 321 | sux_ver := "sux v" SuxCore.version 322 | ; Gui, sux_About:Add, Text,, % sux_ver 323 | Gui, sux_About:Add, Text 324 | 325 | s := "" lang("Home Page") "" 326 | Gui, sux_About:Add, Link,, % s 327 | s := "" lang("Feedback") "" 328 | Gui, sux_About:Add, Link,, % s 329 | s := "" lang("Open GitHub to light up the little star!") "" 330 | Gui, sux_About:Add, Link,, % s 331 | s := "" lang("Open Zhihu to like sux!") "" 332 | Gui, sux_About:Add, Link,, % s 333 | Gui, sux_About:Add, Text 334 | GuiControl, Focus, Close 335 | s := lang("About") . " " . sux_ver 336 | Gui, sux_About:Show,, % s 337 | } 338 | 339 | Update_Icon() 340 | { 341 | setsuspend := A_IsSuspended 342 | setpause := A_IsPaused 343 | if !setpause && !setsuspend { 344 | this.SetIcon(this.icon_default) 345 | } 346 | Else if !setpause && setsuspend { 347 | this.SetIcon(this.icon_disable) 348 | } 349 | Else if setpause && !setsuspend { 350 | this.SetIcon(this.icon_disable) 351 | } 352 | Else if setpause && setsuspend { 353 | this.SetIcon(this.icon_disable) 354 | } 355 | } 356 | 357 | ; Tray.SetIcon 358 | SetIcon(path) 359 | { 360 | if(FileExist(path)) { 361 | Menu, Tray, Icon, %path%,,1 362 | } 363 | } 364 | 365 | ; Tray.SetMenu 366 | SetMenu(menuList) 367 | { 368 | Menu, Tray, DeleteAll 369 | Menu, Tray, NoStandard 370 | xMenu.add("Tray", menuList) 371 | } 372 | 373 | ExitSux(show_msg=true) 374 | { 375 | ExitApp 376 | } 377 | 378 | Edit_conf() 379 | { 380 | OpenFolderAndSelectFile(SuxCore.conf_user_json_file) 381 | } 382 | 383 | OpenSuxFolder() 384 | { 385 | ; OpenFolderAndSelectFile(SuxCore.conf_user_json_file) 386 | OpenFolder(A_WorkingDir) 387 | } 388 | 389 | SetDisable(act="toggle") 390 | { 391 | setdisable := (act="toggle")? !(A_IsPaused&&A_IsSuspended): act 392 | TrayMenu.SetState(setdisable, setdisable) 393 | } 394 | 395 | SetState(setsuspend="", setpause="") 396 | { 397 | setsuspend := (setsuspend="")? A_IsSuspended: setsuspend 398 | setpause := (setpause="")? A_IsPaused: setpause 399 | if(!A_IsSuspended && setsuspend) { 400 | RunArr(SuxCore.OnSuspendCmd) 401 | } 402 | if(!A_IsPaused && setpause) { 403 | RunArr(SuxCore.OnPauseCmd) 404 | } 405 | if(setsuspend) { 406 | Suspend, On 407 | } 408 | else { 409 | Suspend, Off 410 | } 411 | if(setpause) { 412 | Pause, On, 1 413 | } 414 | else { 415 | Pause, Off 416 | } 417 | TrayMenu.update_tray_menu() 418 | } 419 | } 420 | 421 | 422 | 423 | ; ////////////////////////////////////////////////////////////////////////// 424 | ; ////////////////////////////////////////////////////////////////////////// 425 | ; ////////////////////////////////////////////////////////////////////////// 426 | /* 427 | e.g. 428 | xMenu.Add("Menu1", [["item1","func1"],["item2","func2"],[] 429 | ,["submenu",["subitem_1","func3"] 430 | ,["subitem_2",, {sub: "SubMenu", "disable"}]]]) 431 | xMenu.Show("Menu1") 432 | */ 433 | class xMenu 434 | { 435 | static MenuList := {} 436 | 437 | Show(Menu_Name, X := "", Y := "") 438 | { 439 | if (X == "" || Y == "") 440 | Menu, %Menu_Name%, Show 441 | Else 442 | Menu, %Menu_Name%, Show, % X, % Y 443 | } 444 | 445 | New(Menu_Name, Menu_Config) 446 | { 447 | this.Clear(Menu_Name) 448 | this.Add(Menu_Name, Menu_Config) 449 | } 450 | 451 | Clear(Menu_Name) 452 | { 453 | Try 454 | { 455 | Menu, %Menu_Name%, DeleteAll 456 | } 457 | } 458 | 459 | Add(Menu_Name, Menu_Config) 460 | { 461 | ParsedCfg := this._Config_Parse(Menu_Name, Menu_Config) 462 | Loop, % ParsedCfg.MaxIndex() 463 | { 464 | cfg_entry := ParsedCfg[A_Index] 465 | if (cfg_entry[4].HasKey("sub")) 466 | { 467 | sub_name := cfg_entry[4]["sub"] 468 | Menu, % cfg_entry[1], Add, % cfg_entry[2], :%sub_name% 469 | } 470 | Else 471 | { 472 | Menu, % cfg_entry[1], Add, % cfg_entry[2], Sub_xMenu_Open 473 | this.MenuList[cfg_entry[1] "_" cfg_entry[2]] := cfg_entry[3] 474 | } 475 | For Key, Value in cfg_entry[4] 476 | { 477 | if Value = 0 478 | Continue 479 | StringLower, Key, Key 480 | if(Key == "check") { 481 | Menu, % cfg_entry[1], Check, % cfg_entry[2] 482 | } 483 | if(Key == "uncheck") 484 | Menu, % cfg_entry[1], UnCheck, % cfg_entry[2] 485 | if(Key == "togglecheck") 486 | Menu, % cfg_entry[1], ToggleCheck, % cfg_entry[2] 487 | if(Key == "enable") 488 | Menu, % cfg_entry[1], Enable, % cfg_entry[2] 489 | if(Key == "disable") { 490 | Menu, % cfg_entry[1], Disable, % cfg_entry[2] 491 | } 492 | if(Key == "toggleenable") 493 | Menu, % cfg_entry[1], ToggleEnable, % cfg_entry[2] 494 | } 495 | } 496 | } 497 | 498 | _Config_Parse(PName, Config) 499 | { 500 | ParsedCfg := {} 501 | Loop, % Config.MaxIndex() 502 | { 503 | cfg_entry := Config[A_Index] 504 | If IsObject(cfg_entry[2]) 505 | { 506 | ParsedCfg_Sub := this._Config_Parse(cfg_entry[1], cfg_entry[2]) 507 | Loop, % ParsedCfg_Sub.MaxIndex() 508 | { 509 | sub_entry := ParsedCfg_Sub[A_Index] 510 | ParsedCfg.Insert([sub_entry[1],sub_entry[2],sub_entry[3],sub_entry[4]]) 511 | } 512 | ParsedCfg.Insert([PName,cfg_entry[1],,{"sub":cfg_entry[1]}]) 513 | } 514 | Else 515 | { 516 | if cfg_entry.MaxIndex() == 3 517 | cfg_ctrl := cfg_entry[3] 518 | Else 519 | cfg_ctrl := {} 520 | ParsedCfg.Insert([PName,cfg_entry[1],cfg_entry[2],cfg_ctrl]) 521 | } 522 | } 523 | Return % ParsedCfg 524 | } 525 | } 526 | 527 | 528 | ; AHK_NOTIFYICON(wParam, lParam) 529 | ; { 530 | ; if (lParam = 0x205) ; WM_RBUTTONUP 531 | ; { 532 | ; ; SetTimer, ShowRbuttonMenu, -1 533 | ; MouseGetPos, mouse_x, mouse_y 534 | ; TrayMenu.last_tray_icon_x := mouse_x 535 | ; TrayMenu.last_tray_icon_y := mouse_y 536 | ; tt(TrayMenu.last_tray_icon_x " \\ " TrayMenu.last_tray_icon_y) 537 | ; Menu, Tray, Show 538 | ; ; Menu, Tray, Show, % TrayMenu.last_tray_icon_x, % TrayMenu.last_tray_icon_y 539 | ; return 0 540 | ; } 541 | ; else if (lParam = 0x202) ; WM_LBUTTONUP 542 | ; { 543 | ; ; tt(111) 544 | ; TrayMenu.SetDisable() 545 | ; ; TrayMenu.update_tray_menu() 546 | ; return 0 547 | ; } 548 | ; } 549 | 550 | 551 | ShellMessage( wParam,lParam ) { 552 | If ( wParam = 1 ) ; HSHELL_WINDOWCREATED := 1 553 | { 554 | MoveWindowToMouseMonitor(lParam) 555 | } 556 | } 557 | 558 | 559 | Sub_xMenu_Open: 560 | ; ActiveHwnd := WinExist("A") 561 | Run(xMenu.MenuList[A_ThisMenu "_" A_ThisMenuItem]) 562 | 563 | ;; 下面这两行不能调换顺序, 否则会有乱切换软件的bug 564 | ; Send, !{esc} ; GotoNextApp, 没有这一行的话, 点击了菜单之后双击alt没反应, 还得点击一下其他地方才有反应 565 | TrayMenu.update_tray_menu() 566 | ; tt(TrayMenu.last_tray_icon_x " \\ " TrayMenu.last_tray_icon_y) 567 | ; Menu, Tray, Show, % TrayMenu.last_tray_icon_x, % TrayMenu.last_tray_icon_y+2 568 | 569 | ; WinActivate 570 | ; WinActivate, ahk_id %ActiveHwnd% 571 | Return 572 | 573 | 574 | 575 | TICK_HOT_CORNERS: 576 | global LIMIT_MODE 577 | if (LIMIT_MODE) { 578 | return 579 | } 580 | global HOTKEY_REGISTER_MAP 581 | border_code := get_border_code() 582 | ; tt(border_code) 583 | if (InStr(border_code, "Corner")) { 584 | action := HOTKEY_REGISTER_MAP[border_code "|" "hover"] 585 | ; tt(border_code "|" "hover") 586 | ; tt(action, 1111) 587 | run(action) 588 | Loop 589 | { 590 | if (get_border_code() == "") 591 | break ; exits loop when mouse is no longer in the corner 592 | } 593 | } 594 | Return 595 | 596 | 597 | HANDLE_LIMIT_MODE_IN_FULL_SCREEN: 598 | global LIMIT_MODE 599 | if (IsFullscreen()) { 600 | ; WinGetClass, class, A 601 | ; tt(class) 602 | if (WinActive("ahk_class #32770")) { ;; #32770是截图的ahk_class, 因为截图也是全屏模式, 所以要避免截图的时候进入limit_mode 603 | Return 604 | } 605 | if (LIMIT_MODE == 0) { 606 | ; tt(lang("sux limit mode auto enable in full screen mode") . ".", 1111) 607 | LIMIT_MODE := 1 608 | } 609 | } 610 | else { 611 | if (LIMIT_MODE == 1) { 612 | ; tt(lang("sux limit mode auto disable not in full screen mode") . ".", 1111) 613 | LIMIT_MODE := 0 614 | } 615 | } 616 | Return 617 | 618 | 619 | 620 | ; ////////////////////////////////////////////////////////////////////////// 621 | SUB_TRAY_MENU_FILE_END_LABEL: 622 | temp_tm := "blabla" -------------------------------------------------------------------------------- /sux.ahk: -------------------------------------------------------------------------------- 1 | ; ; Note: Save with encoding UTF-8 with BOM if possible. 2 | ; ; Notepad will save UTF-8 files with BOM automatically (even though it does not say so). 3 | ; ; Some editors however save without BOM, and then special characters look messed up in the AHK GUI. 4 | 5 | 6 | #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. 7 | ; #Warn ; Enable warnings to assist with detecting common errors. 8 | ; SendMode Input ; 发现这一行会导致pycharm一直把caps弄得一直处于按住状态, 所以注释了. Recommended for new scripts due to its superior speed and reliability. 9 | SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. 10 | #SingleInstance 11 | 12 | 13 | ; SetCapsLockState, AlwaysOff ; 因为ahk语言的自身局限性, 必须得在这里加这一行, 只放在 sux_core.ahk里的话, 会有bug 14 | 15 | 16 | ----------------------- 17 | 18 | 19 | ; #Include %A_ScriptDir%\source\common_const.ahk 20 | #Include %A_ScriptDir%\source\util.ahk 21 | #Include %A_ScriptDir%\source\sux_core.ahk 22 | ; #Include %A_ScriptDir%\source\quick_entry.ahk 23 | ; #Include %A_ScriptDir%\source\clipboard_plus.ahk 24 | 25 | 26 | ;;;;;;;;;;;;;;;;;;;;;;;;;;; 27 | 28 | RunAsAdmin() 29 | SuxCore.init() 30 | --------------------------------------------------------------------------------