Jump to content

PantZ4

Active Members
  • Posts

    238
  • Joined

  • Last visited

About PantZ4

  • Birthday 01/14/1989

PantZ4's Achievements

Polymath

Polymath (5/7)

0

Reputation

  1. Is it possible for me to check if my computer is disconnect from a VPN tunnel and reconnect soon as possible?
  2. Doh thanks .
  3. #Region - Find shortcut for executable $IsInShortcutDir = False $SearchHandle = FileFindFirstFile(@StartupCommonDir & "\" & "*.lnk"); Find all .lnk files in the commen startup dir If $SearchHandle <> - 1 Then; If any shortcut were founded. $ShortcutFile = FileFindNextFile($SearchHandle); Get first file While Not @error; Loop until no more files $ShortcutData = FileGetShortcut($ShortcutFile); Get details about the shortcut If $ShortcutData[0] = @ScriptFullPath Then; If shortcut leads to the executable $IsInShortcutDir = True; Then confirm it ExitLoop; And exit loop EndIf $ShortcutFile = FileFindNextFile($SearchHandle); Otherwise continue the search WEnd EndIf FileClose($SearchHandle); Close handle If $IsInShortcutDir = True Then; If confirmed MsgBox(0,0,"Shortcut founded") EndIf #EndRegion - Find shortcut for executable Anyone that can point out the error here? I get the "Subscript used with non-Array variable" error upon "If $ShortcutData[0] = ..." line. Why? Thanks.
  4. So how do you use Coordmode with GUI creation? I was wondering if I could used it like this; Control 1 gets placed in x10,y15 and Control 2 would be placed in Control 1s x + 10 and Control 1s y + 15? E.g. it would use the previous control xy for the next control, so you can keep "building" upon. Or have I miss understand the coordmode? Sorry, English aren't my native language. Possible to provide an example?
  5. On the CVSWrapper page it says you need to add a few commands to your SciTEUser.properties file. But where is this file placed? In the SciTE folder I can only find SciTE.properties and SciTEGlobal.properties. Thanks.
  6. Well the problem is that WinSetTrans makes the transparent windows slow and flickers when going from non-transparent to transparent. For example: For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 8 ) Then $LastActiveWindow = $List[$x][1] WinSetTrans($LastActiveWindow,"",254.9) EndIf Next This code finds the active window and apply transparency. Notice that I have written 254.9 to make it almost not transparent. The reason to this is because if you set it to become non transparent it will flicker black for millisec but enough to see it. Which is kind of annoying. On the other hand having the active window not full non transparent makes it slow for some reason. So it is a question about efficiency vs. lookout. Personal I prefer 255 for faster process. Global $Transparency = 255 * 0.75 Global $FullTransparency = 254.9 Global $LastActiveWindow = 1 HotKeySet("x","reset") $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 2 ) Then WinSetTrans($List[$x][1],"",$Transparency) Next While 1 If WinActive($LastActiveWindow) Then Sleep(10) Else WinSetTrans($LastActiveWindow,"",$Transparency) $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 8 ) Then $LastActiveWindow = $List[$x][1] WinSetTrans($LastActiveWindow,"",$FullTransparency) EndIf Next EndIf WEnd Func reset() $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 2 ) Then WinSetTrans($List[$x][1],"",255) Next Exit EndFunc Sorry arjan. Didn't mean to hijack the topic .
  7. Heh (Remember to press x on your keyboard to reset all windows transparency) Global $Transparency = 255 * 0.75 Global $LastActiveWindow = 1 HotKeySet("x","reset") $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 2 ) Then WinSetTrans($List[$x][1],"",$Transparency) Next While 1 CheckInactive() Sleep(10) WEnd Func CheckInactive() If WinActive($LastActiveWindow) Then Return Else WinSetTrans($LastActiveWindow,"",$Transparency) $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 8 ) Then $LastActiveWindow = $List[$x][1] WinSetTrans($LastActiveWindow,"",254.9) EndIf Next EndIf EndFunc Func reset() $List = WinList() For $x = 1 To $List[0][0] If BitAnd( WinGetState($List[$x][1]), 2 ) Then WinSetTrans($List[$x][1],"",255) Next Exit EndFunc
  8. If you use Windows Live Mail you can right click on your account name, select Properties and go under the "Server" tab. mail.services.live.com
  9. Of course I have done this already. Sorry for not have written this in the first post. Even if I hadn't done GUIOnEventMode, I should still be able to run the script right? The macro would just return 0. Opt("GUIOnEventMode", 1) ; Apply Local $GS_Apply_T = IniRead($APPLANGFILE, $APPLANG, $GS_Apply_KEY, $GS_Apply_DEF) Global $GS_Apply = GUICtrlCreateButton($GS_Apply_T, $GS_Apply_X, $GS_Apply_Y, $GS_Apply_W, $GS_Apply_H, $GS_Apply_S, $GS_Apply_ExS) GUICtrlSetOnEvent(-1, "_GUICtrlSetState_Apply") EDIT: Nevermind founded the error. One of the setup functions were linking to it without a control input.
  10. So I keep getting a unknown macro error on @GUI_CtrlId. >"C:\Programmer\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\HP_Ejer\Skrivebord\AutoIt\Wallpaper changer\Src\include\_GUICreate_Settings.au3" /autoit3dir "C:\Programmer\AutoIt3" /UserParams +>10:44:10 Starting AutoIt3Wrapper v.1.10.1.8 Environment(Language:0406 Keyboard:00000406 OS:WIN_XP/Service Pack 2 CPU:X86) >Running AU3Check (1.54.13.0) from:C:\Programmer\AutoIt3 +>10:44:10 AU3Check ended.rc:0 >Running:(3.2.12.0):C:\Programmer\AutoIt3\autoit3.exe "C:\Documents and Settings\HP_Ejer\Skrivebord\AutoIt\Wallpaper changer\Src\include\_GUICreate_Settings.au3" C:\Documents and Settings\HP_Ejer\Skrivebord\AutoIt\Wallpaper changer\Src\include\_GUICreate_Settings.au3 (355) : ==> Unknown macro.: If @GUI_CtrlId = $GS_Apply Then If ^ ERROR ->10:44:11 AutoIT3.exe ended.rc:1 >Exit code: 1 Time: 1.800 The function: ; #FUNCTION# =============================================================================== ; Name...........: _GUICtrlSetState_Apply ; Description ...: Set the state of the apply button ; Syntax.........: _GUICtrlSetState_Apply() ; Parameters ....: None ; Return values .: 0 ; Author ........: Mr. Zero ; Modified.......: ; Remarks .......: ; Related .......: ; Link ..........; ; Example .......; No ; =========================================================================================== Func _GUICtrlSetState_Apply() ; If the pressed control were the Apply button If @GUI_CtrlId = $GS_Apply Then ; Then set it to disabled GUICtrlSetState($GS_Apply, $GUI_DISABLE) ; And write to settings file _IniWrite_Settings() ; Else if Apply button is already disabled ElseIf BitAND(GUICtrlGetState($GS_Apply), $GUI_DISABLE) Then ; Then enable it GUICtrlSetState($GS_Apply, $GUI_ENABLE) ; End EndIf EndFunc ;==>_GUICtrlSetState_Apply Any idea why I get this error?
  11. And "OnExitFunc" doesn't apply to this?
  12. Try open the help file and look up "Tray functions". You will find many options, including remove the default tray menu.
  13. HotKeySet("q","_Terminate") While 1 Sleep(10) WEnd Func _Terminate() Exit EndFunc I would rather do this as HotKeySet only need to be set once and not all the time with a loop. Also you can't name your exit function "exit" as that is a predefined command. "_exit" or "_terminate" would be two other suggestions.
  14. Sure. $msg = RegRead("MyKey","MyValue") If $msg <> "Supported" Then $msg = "Undefined" EndIf MsgBox(0,"My Program",$msg)
×
×
  • Create New...