├── .github
└── ISSUE_TEMPLATE
│ └── bug_report.md
├── .gitignore
├── LICENSE
├── README.md
├── cli.au3
├── data
├── adapters.au3
├── options.au3
└── profiles.au3
├── events.au3
├── forms
├── _form_about.au3
├── _form_blacklist.au3
├── _form_changelog.au3
├── _form_debug.au3
├── _form_error.au3
├── _form_main.au3
├── _form_restart.au3
├── _form_settings.au3
└── _form_update.au3
├── functions.au3
├── hexIcons.au3
├── icon.ico
├── lang
├── lang-de-DE.json
├── lang-en-US.json
├── lang-es-ES.json
├── lang-fr-FR.json
├── lang-it-IT.json
├── lang-nl-NL.json
├── lang-ro-RO.json
├── lang-ru-RU.json
└── lang-zh-CN.json
├── languages.au3
├── libraries
├── AutoItObject.au3
├── GetInstalledPath.au3
├── GuiFlatButton.au3
├── GuiFlatToolbar.au3
├── Json
│ ├── BinaryCall.au3
│ └── Json.au3
├── StringSize.au3
├── Toast.au3
├── _NetworkStatistics.au3
├── asyncRun.au3
└── oLinkedList.au3
├── main.au3
└── network.au3
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: "[BUG] "
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Version:**
11 | What version are you using?
12 |
13 | **Expected Behavior:**
14 | A clear description of what you expected to happen.
15 |
16 | **Actual Behavior:**
17 | A clear description of what _actually_ happened.
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## readme
2 | profiles.ini
3 | main_stripped.au3
4 | Simple IP Config*.exe
5 | *.zip
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Simple IP Config
4 |
5 | Simple IP Config is a small, portable ip changer utility to change common Windows network settings quickly and easily without having to click through the endless system windows.
6 |
7 | 
8 |
9 | Features
10 | ---
11 | * View / Change IP Address, Subnet Mask, Gateway, DNS Servers
12 | * Simple, easy to use interface
13 | * Tiny install size
14 | * Portable / run from USB
15 | * Enable / Disable Network Adapters
16 | * Save unlimited number of profiles for quickly changing settings
17 | * Shortcuts for common actions
18 | * Send to tray for later use
19 | * Support for multiple languages
20 | * Free for personal and commercial use
21 |
22 | Installing
23 | ---
24 | 1. Download the latest Setup file: [Simple IP Config][latest].
25 | 2. Run the installer.
26 |
27 | **Manual Installation (Portable):**
28 | 1. Download the latest *.exe.
29 | 2. Run the .exe file from any location on your computer or USB drive.
30 |
31 | You can download older versions from the [releases page][releases].
32 |
33 | Help & Support
34 | ---
35 | * To view currently open bugs, [click here][bugs]
36 | * To view or submit neww feature requests, visit the [discussions](https://github.com/KurtisLiggett/Simple-IP-Config/discussions/categories/ideas) page and look for the _Ideas_ category.
37 | * Have a question? Visit the [discussions](https://github.com/KurtisLiggett/Simple-IP-Config/discussions/categories/q-a) page and look for the _Q&A_ category.
38 |
39 | License
40 | ---
41 | [GNU GPL v3.0](https://github.com/KurtisLiggett/Simple-IP-Config/blob/master/LICENSE)
42 |
43 |
44 | [logo]: https://raw.github.com/KurtisLiggett/simple-ip-config/master/logo.png "Simple IP Config"
45 | [latest]: https://github.com/KurtisLiggett/Simple-IP-Config/releases/latest "Latest Download"
46 | [releases]: https://github.com/KurtisLiggett/Simple-IP-Config/releases "All Releases"
47 | [beta]: https://github.com/KurtisLiggett/Simple-IP-Config/releases/tag/2.8.1-b1 "Download Beta"
48 | [issues]: https://github.com/KurtisLiggett/Simple-IP-Config/issues "Issues"
49 | [bugs]: https://github.com/KurtisLiggett/Simple-IP-Config/labels/bug "Bugs"
50 | [new-features]: https://github.com/KurtisLiggett/Simple-IP-Config/labels/new%20feature "New features"
51 |
--------------------------------------------------------------------------------
/cli.au3:
--------------------------------------------------------------------------------
1 | ; -----------------------------------------------------------------------------
2 | ; This file is part of Simple IP Config.
3 | ;
4 | ; Simple IP Config is free software: you can redistribute it and/or modify
5 | ; it under the terms of the GNU General Public License as published by
6 | ; the Free Software Foundation, either version 3 of the License, or
7 | ; (at your option) any later version.
8 | ;
9 | ; Simple IP Config is distributed in the hope that it will be useful,
10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | ; GNU General Public License for more details.
13 | ;
14 | ; You should have received a copy of the GNU General Public License
15 | ; along with Simple IP Config. If not, see .
16 | ;
17 | ;
18 | ; The CLI commands:
19 | ;
20 | ; Command: /set-config
21 | ; Params: "profile name"
22 | ; -----------------------------------------------------------------------------
23 |
24 | Global $cmdLine
25 | Func CheckCmdLine()
26 | If $cmdLine[0] Then
27 | If (UBound($cmdLine) = 3) Then
28 | Switch $cmdLine[1]
29 | Case '/set-config'
30 | $profileName = $cmdLine[2]
31 | ; Code for configuration
32 | _loadProfiles()
33 | ; Let's check if the profile name exists
34 | If $profiles.exists($profileName) Then
35 | $cmdLine = 1
36 | $sMsg = 'Applying profile "' & $profileName & '"...'
37 | _Toast_Set(0, 0xAAAAAA, 0x000000, 0xFFFFFF, 0x000000, 10, "", 250, 250)
38 | $aRet = _Toast_Show(0, "Simple IP Config", $sMsg, 0, False) ; Delay can be set here because script continues
39 |
40 | Local $oProfile = $profiles.get($profileName)
41 | $ipAuto = $oProfile.IpAuto
42 | $ipAddress = $oProfile.IpAddress
43 | $ipSubnet = $oProfile.IpSubnet
44 | $ipGateway = $oProfile.IpGateway
45 | $dnsAuto = $oProfile.DnsAuto
46 | $dnsPref = $oProfile.IpDnsPref
47 | $dnsAlt = $oProfile.IpDnsAlt
48 | $dnsReg = $oProfile.RegisterDns
49 | $adapterName = $oProfile.AdapterName
50 | _apply($ipAuto, $ipAddress, $ipSubnet, $ipGateway, $dnsAuto, $dnsPref, $dnsAlt, $dnsReg, $adapterName, RunCallback_cli)
51 | _cmdLineMain($profileName)
52 | EndIf
53 | $sMsg = 'The profile "' & $profileName & '" could not be found.'
54 | _Toast_Set(0, 0xFF0000, 0xFFFFFF, 0xFFFFFF, 0x000000, 10, "", 250, 250)
55 | $aRet = _Toast_Show(0, "Simple IP Config", $sMsg, -3, True) ; Delay can be set here because script continues
56 |
57 | Case Else
58 | Exit
59 | EndSwitch
60 | Exit
61 | Else
62 | $sMsg = "Incorrect number of parameters."
63 | _Toast_Set(0, 0xFF0000, 0xFFFFFF, 0xFFFFFF, 0x000000, 10, "", 250, 250)
64 | $aRet = _Toast_Show(0, "Simple IP Config", $sMsg, -3, True) ; Delay can be set here because script continues
65 | Exit
66 | EndIf
67 | EndIf
68 | EndFunc ;==>CheckCmdLine
69 |
70 | Func RunCallback_cli($sDescription, $sNextDescription, $sStdOut)
71 | Return 0
72 | EndFunc ;==>RunCallback_cli
73 |
74 | ;main loop when called from CLI
75 | ;Loop and do nothing until the profile has been set
76 | Func _cmdLineMain($profileName)
77 | While 1
78 | If asyncRun_isIdle() Then
79 | _Toast_Hide()
80 | If StringInStr($sStdOut, "failed") Then
81 | $sMsg = 'An error occurred while applying the profile "' & $profileName & '".' & @CRLF & @CRLF & $sStdOut
82 | _Toast_Set(0, 0xFF0000, 0xFFFFFF, 0xFFFFFF, 0x000000, 10, "", 250, 250)
83 | $aRet = _Toast_Show(0, "Simple IP Config", $sMsg, -7, True) ; Delay can be set here because script continues
84 | Else
85 | $sMsg = 'Profile "' & $profileName & '" applied successfully.'
86 | _Toast_Set(0, 0xAAAAAA, 0x000000, 0xFFFFFF, 0x000000, 10, "", 250, 250)
87 | $aRet = _Toast_Show(0, "Simple IP Config", $sMsg, 2, True) ; Delay can be set here because script continues
88 | EndIf
89 |
90 | Exit
91 | EndIf
92 |
93 | Sleep(100)
94 | WEnd
95 | EndFunc ;==>_cmdLineMain
96 |
--------------------------------------------------------------------------------
/data/adapters.au3:
--------------------------------------------------------------------------------
1 | ; -----------------------------------------------------------------------------
2 | ; This file is part of Simple IP Config.
3 | ;
4 | ; Simple IP Config is free software: you can redistribute it and/or modify
5 | ; it under the terms of the GNU General Public License as published by
6 | ; the Free Software Foundation, either version 3 of the License, or
7 | ; (at your option) any later version.
8 | ;
9 | ; Simple IP Config is distributed in the hope that it will be useful,
10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | ; GNU General Public License for more details.
13 | ;
14 | ; You should have received a copy of the GNU General Public License
15 | ; along with Simple IP Config. If not, see .
16 | ; -----------------------------------------------------------------------------
17 |
18 | #Region -- adapters --
19 | Global Enum $ADAPTER_Name, $ADAPTER_Description, $ADAPTER_MAC, $ADAPTER_MAX
20 |
21 | ; Constructor
22 | Func Adapter()
23 | Local $hObject[1][3] = [[0, 0, 0]] ; [0]-name, [1]-mac, [2]-description, [3]-GUID
24 |
25 | ; Return the 'object'
26 | Return $hObject
27 | EndFunc ;==>Adapter
28 |
29 | ; Check if name exists
30 | Func Adapter_Exists(ByRef $hObject, $sName)
31 | If Not _Adapter_IsObject($hObject) Then Return Null
32 |
33 | Local $iIndex = _ArraySearch($hObject, $sName)
34 | Return $iIndex = -1 ? 0 : 1
35 | EndFunc ;==>Adapter_Exists
36 |
37 | ; sort Adapter
38 | Func Adapter_Sort(ByRef $hObject, $desc = 0)
39 | If Not _Adapter_IsObject($hObject) Then Return Null
40 |
41 | _ArraySort($hObject, $desc)
42 | EndFunc ;==>Adapter_Sort
43 |
44 | ; get size
45 | Func Adapter_GetSize(ByRef $hObject)
46 | If Not _Adapter_IsObject($hObject) Then Return Null
47 |
48 | Return UBound($hObject)
49 | EndFunc ;==>Adapter_GetSize
50 |
51 | ; property Getters
52 | Func Adapter_GetName(ByRef $hObject, $iIndex)
53 | If Not _Adapter_IsObject($hObject) Then Return Null
54 |
55 | Return $iIndex <> -1 ? $hObject[$iIndex][0] : Null
56 | EndFunc ;==>Adapter_GetName
57 |
58 | Func Adapter_GetMAC(ByRef $hObject, $sName)
59 | If Not _Adapter_IsObject($hObject) Then Return Null
60 |
61 | Local $iIndex = _ArraySearch($hObject, $sName)
62 | Return $iIndex <> -1 ? $hObject[$iIndex][1] : Null
63 | EndFunc ;==>Adapter_GetMAC
64 |
65 | Func Adapter_GetDescription(ByRef $hObject, $sName)
66 | If Not _Adapter_IsObject($hObject) Then Return Null
67 |
68 | Local $iIndex = _ArraySearch($hObject, $sName)
69 | Return $iIndex <> -1 ? $hObject[$iIndex][2] : Null
70 | EndFunc ;==>Adapter_GetDescription
71 |
72 | ; add adapter
73 | Func Adapter_Add(ByRef $hObject, $sName, $sMAC, $sDescription)
74 | If Not _Adapter_IsObject($hObject) Then Return
75 |
76 | If UBound($hObject) = 1 And $hObject[0][0] = "" Then
77 | $hObject[0][0] = $sName
78 | $hObject[0][1] = $sMAC
79 | $hObject[0][2] = $sDescription
80 | Else
81 | ;~ $ret = _ArrayAdd($hObject, $sName & "|" & $sMAC & "|" & $sDescription, 0, "|")
82 | Local $size = UBound($hObject)
83 | ReDim $hObject[$size+1][3]
84 | $hObject[$size][0] = $sName
85 | $hObject[$size][1] = $sMAC
86 | $hObject[$size][2] = $sDescription
87 | EndIf
88 |
89 | EndFunc ;==>Adapter_Add
90 |
91 | ; delete profile
92 | Func Adapter_Delete(ByRef $hObject, $sName)
93 | If Not _Adapter_IsObject($hObject) Then Return
94 |
95 | Local $profIndex = _ArraySearch($hObject, $sName)
96 | If $profIndex = -1 Then Return
97 |
98 | _ArrayDelete($hObject, $profIndex)
99 | EndFunc ;==>Adapter_Delete
100 |
101 | ; delete all Adapters
102 | Func Adapter_DeleteAll(ByRef $hObject)
103 | If Not _Adapter_IsObject($hObject) Then Return
104 |
105 | _ArrayDelete($hObject, "0-" & UBound($hObject) - 1)
106 | EndFunc ;==>Adapter_DeleteAll
107 |
108 | ; Check if it's a valid 'object'. INTERNAL ONLY!
109 | Func _Adapter_IsObject(ByRef $hObject)
110 | Return UBound($hObject, 2) = $ADAPTER_MAX
111 | EndFunc ;==>_Adapter_IsObject
112 |
113 | ; Get array of profile names
114 | Func Adapter_GetNames(ByRef $hObject)
115 | If Not _Adapter_IsObject($hObject) Then Return
116 |
117 | Local $size = UBound($hObject)
118 | Local $aNames[$size]
119 | For $i = 0 To $size - 1
120 | $aNames[$i] = $hObject[$i][0]
121 | Next
122 | Return $aNames
123 | EndFunc ;==>Adapter_GetNames
124 | #EndRegion -- adapters --
125 |
--------------------------------------------------------------------------------
/data/options.au3:
--------------------------------------------------------------------------------
1 | ; -----------------------------------------------------------------------------
2 | ; This file is part of Simple IP Config.
3 | ;
4 | ; Simple IP Config is free software: you can redistribute it and/or modify
5 | ; it under the terms of the GNU General Public License as published by
6 | ; the Free Software Foundation, either version 3 of the License, or
7 | ; (at your option) any later version.
8 | ;
9 | ; Simple IP Config is distributed in the hope that it will be useful,
10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | ; GNU General Public License for more details.
13 | ;
14 | ; You should have received a copy of the GNU General Public License
15 | ; along with Simple IP Config. If not, see .
16 | ; -----------------------------------------------------------------------------
17 |
18 | Func _Options()
19 | Local $oObject = _AutoItObject_Create()
20 |
21 | ;object properties
22 | _AutoItObject_AddProperty($oObject, "Version")
23 | _AutoItObject_AddProperty($oObject, "MinToTray")
24 | _AutoItObject_AddProperty($oObject, "StartupMode")
25 | _AutoItObject_AddProperty($oObject, "Language")
26 | _AutoItObject_AddProperty($oObject, "StartupAdapter")
27 | _AutoItObject_AddProperty($oObject, "Theme")
28 | _AutoItObject_AddProperty($oObject, "SaveAdapterToProfile")
29 | _AutoItObject_AddProperty($oObject, "AdapterBlacklist")
30 | _AutoItObject_AddProperty($oObject, "PositionX")
31 | _AutoItObject_AddProperty($oObject, "PositionY")
32 | _AutoItObject_AddProperty($oObject, "PositionW")
33 | _AutoItObject_AddProperty($oObject, "PositionH")
34 | _AutoItObject_AddProperty($oObject, "AutoUpdate")
35 | _AutoItObject_AddProperty($oObject, "LastUpdateCheck")
36 | _AutoItObject_AddProperty($oObject, "count", $ELSCOPE_PRIVATE, 14)
37 |
38 | ;object methods
39 | _AutoItObject_AddMethod($oObject, "getSection", "_Options_getSection")
40 | _AutoItObject_AddMethod($oObject, "getSectionStr", "_Options_getSectionStr")
41 |
42 | Return $oObject
43 | EndFunc ;==>_Options
44 |
45 | Func _Options_getSectionStr($oSelf)
46 | Local $sSection = "[Options]" & @CRLF
47 | $sSection &= "Version=" & $oSelf.Version & @CRLF
48 | $sSection &= "MinToTray=" & $oSelf.MinToTray & @CRLF
49 | $sSection &= "StartupMode=" & $oSelf.StartupMode & @CRLF
50 | $sSection &= "Language=" & $oSelf.Language & @CRLF
51 | $sSection &= "StartupAdapter=" & $oSelf.StartupAdapter & @CRLF
52 | $sSection &= "Theme=" & $oSelf.Theme & @CRLF
53 | $sSection &= "SaveAdapterToProfile=" & $oSelf.SaveAdapterToProfile & @CRLF
54 | $sSection &= "AdapterBlacklist=" & $oSelf.AdapterBlacklist & @CRLF
55 | $sSection &= "PositionX=" & $oSelf.PositionX & @CRLF
56 | $sSection &= "PositionY=" & $oSelf.PositionY & @CRLF
57 | $sSection &= "PositionW=" & $oSelf.PositionW & @CRLF
58 | $sSection &= "PositionH=" & $oSelf.PositionH & @CRLF
59 | $sSection &= "AutoUpdate=" & $oSelf.AutoUpdate & @CRLF
60 | $sSection &= "LastUpdateCheck=" & $oSelf.LastUpdateCheck & @CRLF
61 | Return $sSection
62 | EndFunc ;==>_Options_getSectionStr
63 |
64 | Func _Options_getSection($oSelf)
65 | #forceref $oSelf
66 | Local $aObject[$oSelf.count][2]
67 | $aObject[0][0] = "Version"
68 | $aObject[0][1] = $oSelf.Version
69 | $aObject[1][0] = "MinToTray"
70 | $aObject[1][1] = $oSelf.MinToTray
71 | $aObject[2][0] = "StartupMode"
72 | $aObject[2][1] = $oSelf.StartupMode
73 | $aObject[3][0] = "Language"
74 | $aObject[3][1] = $oSelf.Language
75 | $aObject[4][0] = "StartupAdapter"
76 | $aObject[4][1] = $oSelf.StartupAdapter
77 | $aObject[5][0] = "Theme"
78 | $aObject[5][1] = $oSelf.Theme
79 | $aObject[6][0] = "SaveAdapterToProfile"
80 | $aObject[6][1] = $oSelf.SaveAdapterToProfile
81 | $aObject[7][0] = "AdapterBlacklist"
82 | $aObject[7][1] = $oSelf.AdapterBlacklist
83 | $aObject[8][0] = "PositionX"
84 | $aObject[8][1] = $oSelf.PositionX
85 | $aObject[9][0] = "PositionY"
86 | $aObject[9][1] = $oSelf.PositionY
87 | $aObject[10][0] = "AutoUpdate"
88 | $aObject[10][1] = $oSelf.AutoUpdate
89 | $aObject[11][0] = "LastUpdateCheck"
90 | $aObject[11][1] = $oSelf.LastUpdateCheck
91 | $aObject[12][0] = "PositionW"
92 | $aObject[12][1] = $oSelf.PositionW
93 | $aObject[13][0] = "PositionH"
94 | $aObject[13][1] = $oSelf.PositionH
95 | Return $aObject
96 | EndFunc ;==>_Options_getSection
97 |
--------------------------------------------------------------------------------
/data/profiles.au3:
--------------------------------------------------------------------------------
1 | ; -----------------------------------------------------------------------------
2 | ; This file is part of Simple IP Config.
3 | ;
4 | ; Simple IP Config is free software: you can redistribute it and/or modify
5 | ; it under the terms of the GNU General Public License as published by
6 | ; the Free Software Foundation, either version 3 of the License, or
7 | ; (at your option) any later version.
8 | ;
9 | ; Simple IP Config is distributed in the hope that it will be useful,
10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | ; GNU General Public License for more details.
13 | ;
14 | ; You should have received a copy of the GNU General Public License
15 | ; along with Simple IP Config. If not, see .
16 | ; -----------------------------------------------------------------------------
17 |
18 | Func _Profiles()
19 | Local $oObject = _AutoItObject_Create()
20 |
21 | Local $aNames[0]
22 | ;object properties
23 | _AutoItObject_AddProperty($oObject, "count", $ELSCOPE_PUBLIC, 0)
24 | _AutoItObject_AddProperty($oObject, "names", $ELSCOPE_PUBLIC, $aNames)
25 | _AutoItObject_AddProperty($oObject, "Profiles", $ELSCOPE_PUBLIC, LinkedList())
26 |
27 | ;object methods
28 | _AutoItObject_AddMethod($oObject, "create", "_Profiles_createProfile")
29 | _AutoItObject_AddMethod($oObject, "add", "_Profiles_addProfile")
30 | _AutoItObject_AddMethod($oObject, "move", "_Profiles_moveProfile")
31 | _AutoItObject_AddMethod($oObject, "remove", "_Profiles_removeProfile")
32 | _AutoItObject_AddMethod($oObject, "removeAll", "_Profiles_removeAllProfiles")
33 | _AutoItObject_AddMethod($oObject, "get", "_Profiles_getProfile")
34 | _AutoItObject_AddMethod($oObject, "set", "_Profiles_setProfile")
35 | _AutoItObject_AddMethod($oObject, "getNames", "_Profiles_getNames")
36 | _AutoItObject_AddMethod($oObject, "exists", "_Profiles_exists")
37 | _AutoItObject_AddMethod($oObject, "sort", "_Profiles_sort")
38 | _AutoItObject_AddMethod($oObject, "getAsSectionStr", "_Profiles_getAsSectionStr")
39 |
40 | Return $oObject
41 | EndFunc ;==>_Profiles
42 |
43 | Func _Profiles_createProfile($oSelf, $sName)
44 | #forceref $oSelf
45 | Local $oObject = _AutoItObject_Create()
46 |
47 | ;object properties
48 | _AutoItObject_AddProperty($oObject, "ProfileName", $ELSCOPE_PUBLIC, $sName)
49 | _AutoItObject_AddProperty($oObject, "AdapterName")
50 | _AutoItObject_AddProperty($oObject, "IpAuto")
51 | _AutoItObject_AddProperty($oObject, "IpAddress")
52 | _AutoItObject_AddProperty($oObject, "IpSubnet")
53 | _AutoItObject_AddProperty($oObject, "IpGateway")
54 | _AutoItObject_AddProperty($oObject, "DnsAuto")
55 | _AutoItObject_AddProperty($oObject, "IpDnsPref")
56 | _AutoItObject_AddProperty($oObject, "IpDnsAlt")
57 | _AutoItObject_AddProperty($oObject, "RegisterDns")
58 | _AutoItObject_AddProperty($oObject, "Memo")
59 | _AutoItObject_AddProperty($oObject, "count", $ELSCOPE_PUBLIC, 11)
60 | _AutoItObject_AddMethod($oObject, "getSection", "_Profile_getSection")
61 | _AutoItObject_AddMethod($oObject, "getSectionStr", "_Profile_getSectionStr")
62 |
63 | Return $oObject
64 | EndFunc ;==>_Profiles_createProfile
65 |
66 | Func _Profiles_addProfile($oSelf, $oProfile)
67 | #forceref $oSelf
68 |
69 | $oSelf.Profiles.add($oProfile)
70 | $oSelf.count = $oSelf.count + 1
71 |
72 | Local $aNames = $oSelf.names
73 | If $oSelf.count > UBound($oSelf.names) Then
74 | ReDim $aNames[$oSelf.count]
75 | EndIf
76 |
77 | $aNames[$oSelf.count-1] = $oProfile.ProfileName
78 | $oSelf.names = $aNames
79 | EndFunc ;==>_Profiles_addProfile
80 |
81 | Func _Profiles_moveProfile($oSelf, $sName, $indexTo)
82 | Local $oProfileMove = $oSelf.get($sName)
83 | Local $oProfilesTemp = LinkedList()
84 |
85 | ;remove from profile name list
86 | $oSelf.remove($sName)
87 |
88 | ;add name at selected position
89 | Local $aNames = $oSelf.names
90 |
91 | If $indexTo < UBound($aNames) Then
92 | _ArrayInsert($aNames, $indexTo, $sName)
93 | Else
94 | _ArrayAdd($aNames, $sName)
95 | EndIf
96 |
97 | Local $i = 0
98 | For $oProfile in $oSelf.Profiles
99 | If $i = $indexTo Then
100 | $oProfilesTemp.add($oProfileMove)
101 | $oProfilesTemp.add($oProfile)
102 | Else
103 | $oProfilesTemp.add($oProfile)
104 | EndIf
105 | $i += 1
106 | Next
107 |
108 | If $indexTo = UBound($aNames)-1 Then
109 | $oProfilesTemp.add($oProfileMove)
110 | EndIf
111 |
112 | $oSelf.Profiles = 0
113 | $oSelf.Profiles = $oProfilesTemp
114 | $oSelf.names = $aNames
115 |
116 | Return 0
117 | EndFunc ;==>_Profiles_moveProfile
118 |
119 | Func _Profiles_getNames($oSelf)
120 | #forceref $oSelf
121 |
122 | Return $oSelf.names
123 | EndFunc ;==>_Profiles_getNames
124 |
125 | Func _Profiles_exists($oSelf, $sName)
126 | #forceref $oSelf
127 |
128 | Local $bMatch = False
129 |
130 | For $oProfile in $oSelf.Profiles
131 | If $oProfile.ProfileName = $sName Then
132 | $bMatch = True
133 | ExitLoop
134 | EndIf
135 | Next
136 |
137 | Return $bMatch
138 | EndFunc ;==>_Profiles_exists
139 |
140 | Func _Profiles_removeProfile($oSelf, $sName)
141 | Local $index = 0
142 | For $oProfile In $oSelf.Profiles
143 | If $oProfile.ProfileName = $sName Then
144 | $oSelf.Profiles.remove($index)
145 | ExitLoop
146 | EndIf
147 | $index += 1
148 | Next
149 |
150 | $index = 0
151 | Local $aNames = $oSelf.names
152 | For $name In $aNames
153 | If $name = $sName Then
154 | _ArrayDelete($aNames, $index)
155 | ExitLoop
156 | EndIf
157 | $index += 1
158 | Next
159 | $oSelf.names = $aNames
160 |
161 | $oSelf.count = $oSelf.count - 1
162 | EndFunc ;==>_Profiles_removeProfile
163 |
164 | Func _Profiles_removeAllProfiles($oSelf)
165 | $oSelf.Profiles = 0
166 | $oSelf.Profiles = LinkedList()
167 | $oSelf.names = 0
168 | Local $aNames[0]
169 | $oSelf.names = $aNames
170 | $oSelf.count = 0
171 | EndFunc ;==>_Profiles_removeAllProfiles
172 |
173 | Func _Profiles_getProfile($oSelf, $sName)
174 | For $oProfile In $oSelf.Profiles
175 | If $oProfile.ProfileName = $sName Then
176 | Return $oProfile
177 | EndIf
178 | Next
179 |
180 | Return -1
181 | EndFunc ;==>_Profiles_getProfile
182 |
183 | Func _Profiles_setProfile($oSelf, $sName, $oNewProfile)
184 | For $oProfile In $oSelf.Profiles
185 | If $oProfile.ProfileName = $sName Then
186 | $oProfile = $oNewProfile
187 | EndIf
188 | Next
189 |
190 | Return -1
191 | EndFunc ;==>_Profiles_setProfile
192 |
193 | Func _Profiles_sort($oSelf, $iDescending = 0)
194 | #forceref $oSelf
195 | Local $oProfilesTemp = LinkedList()
196 | Local $aNames = $oSelf.names
197 |
198 | ;sort the names first
199 | If Not IsArray($aNames) Then Return 1
200 | _ArraySort($aNames, $iDescending)
201 |
202 | ;recreate the list
203 | For $i=0 to $oSelf.count-1
204 | $oProfilesTemp.add($oSelf.get($aNames[$i]))
205 | Next
206 |
207 | $oSelf.Profiles = 0
208 | $oSelf.Profiles = $oProfilesTemp
209 | $oSelf.names = $aNames
210 |
211 | Return 0
212 | EndFunc ;==>_Profiles_sort
213 |
214 | Func _Profiles_getAsSectionStr($oSelf, $sName)
215 | Local $oProfile = $oSelf.get($sName)
216 | If IsObj($oProfile) Then
217 | Local $sSection = $oProfile.getSectionStr()
218 | Return $sSection
219 | Else
220 | Return 1
221 | EndIf
222 | EndFunc ;==>_Profiles_getAsSectionStr
223 |
224 | Func _Profile_getSectionStr($oSelf)
225 | Local $sSection = "[" & iniNameEncode($oSelf.ProfileName) & "]" & @CRLF
226 | $sSection &= "IpAuto=" & $oSelf.IpAuto & @CRLF
227 | $sSection &= "IpAddress=" & $oSelf.IpAddress & @CRLF
228 | $sSection &= "IpSubnet=" & $oSelf.IpSubnet & @CRLF
229 | $sSection &= "IpGateway=" & $oSelf.IpGateway & @CRLF
230 | $sSection &= "DnsAuto=" & $oSelf.DnsAuto & @CRLF
231 | $sSection &= "IpDnsPref=" & $oSelf.IpDnsPref & @CRLF
232 | $sSection &= "IpDnsAlt=" & $oSelf.IpDnsAlt & @CRLF
233 | $sSection &= "RegisterDns=" & $oSelf.RegisterDns & @CRLF
234 | $sSection &= "AdapterName=" & $oSelf.AdapterName & @CRLF
235 | $sSection &= "Memo=" & $oSelf.Memo & @CRLF
236 |
237 | Return $sSection
238 | EndFunc ;==>_Profile_getSectionStr
239 |
240 | Func _Profile_getSection($oSelf)
241 | #forceref $oSelf
242 | Local $aObject[$oSelf.count - 1][2]
243 | $aObject[0][0] = "AdapterName"
244 | $aObject[0][1] = $oSelf.AdapterName
245 | $aObject[1][0] = "IpAuto"
246 | $aObject[1][1] = $oSelf.IpAuto
247 | $aObject[2][0] = "IpAddress"
248 | $aObject[2][1] = $oSelf.IpAddress
249 | $aObject[3][0] = "IpSubnet"
250 | $aObject[3][1] = $oSelf.IpSubnet
251 | $aObject[4][0] = "IpGateway"
252 | $aObject[4][1] = $oSelf.IpGateway
253 | $aObject[5][0] = "DnsAuto"
254 | $aObject[5][1] = $oSelf.DnsAuto
255 | $aObject[6][0] = "IpDnsPref"
256 | $aObject[6][1] = $oSelf.IpDnsPref
257 | $aObject[7][0] = "IpDnsAlt"
258 | $aObject[7][1] = $oSelf.IpDnsAlt
259 | $aObject[8][0] = "RegisterDns"
260 | $aObject[8][1] = $oSelf.RegisterDns
261 | $aObject[9][0] = "Memo"
262 | $aObject[9][1] = $oSelf.Memo
263 | Return $aObject
264 | EndFunc ;==>_Profile_getSection
265 |
--------------------------------------------------------------------------------
/forms/_form_about.au3:
--------------------------------------------------------------------------------
1 | ; -----------------------------------------------------------------------------
2 | ; This file is part of Simple IP Config.
3 | ;
4 | ; Simple IP Config is free software: you can redistribute it and/or modify
5 | ; it under the terms of the GNU General Public License as published by
6 | ; the Free Software Foundation, either version 3 of the License, or
7 | ; (at your option) any later version.
8 | ;
9 | ; Simple IP Config is distributed in the hope that it will be useful,
10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | ; GNU General Public License for more details.
13 | ;
14 | ; You should have received a copy of the GNU General Public License
15 | ; along with Simple IP Config. If not, see .
16 | ; -----------------------------------------------------------------------------
17 |
18 | Func _form_about()
19 | Local $bt_AboutOk, $lb_Heading, $lb_date, $lb_version, $lb_info, $lb_sig, $pic, $lb_license, $GFLine
20 | $w = 275 * $dScale
21 | $h = 200 * $dScale
22 |
23 | If Not BitAND(WinGetState($hgui), $WIN_STATE_MINIMIZED) Then
24 | $currentWinPos = WinGetPos($hgui)
25 | $x = $currentWinPos[0] + $guiWidth * $dscale / 2 - $w / 2
26 | $y = $currentWinPos[1] + $guiHeight * $dscale / 2 - $h / 2
27 | Else
28 | $x = @DesktopWidth / 2 - $w / 2
29 | $y = @DesktopHeight / 2 - $h / 2
30 | EndIf
31 |
32 | $AboutChild = GUICreate($oLangStrings.about.title & " Simple IP Config", $w, $h, $x, $y, $WS_CAPTION, -1, $hgui)
33 | GUISetOnEvent($GUI_EVENT_CLOSE, "_onExitChild")
34 | GUISetFont($MyGlobalFontSize, -1, -1, $MyGlobalFontName)
35 |
36 | ; top section
37 |
38 | GUICtrlCreateLabel("", 0, 0, $w, $h - 32 * $dscale)
39 | GUICtrlSetBkColor(-1, 0xFFFFFF)
40 | GUICtrlSetState(-1, $GUI_DISABLE)
41 |
42 | GUICtrlCreateLabel("", 0, $h - 32 * $dscale, $w, 1)
43 | GUICtrlSetBkColor(-1, 0x000000)
44 |
45 | $pic = GUICtrlCreatePic("", 17 * $dScale, 22 * $dScale, 64, 64)
46 | _memoryToPic($pic, GetIconData($pngBigicon))
47 |
48 | GUICtrlCreateLabel("Simple IP Config", 75 * $dscale, 10 * $dscale, 200 * $dscale, -1, $SS_CENTER)
49 | GUICtrlSetFont(-1, 13, 800)
50 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
51 | GUICtrlCreateLabel($oLangStrings.about.version & ":", 95 * $dscale, 38 * $dscale, 75 * $dscale, -1, $SS_RIGHT)
52 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
53 | GUICtrlCreateLabel($oLangStrings.about.date & ":", 95 * $dscale, 53 * $dscale, 75 * $dscale, -1, $SS_RIGHT)
54 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
55 | GUICtrlCreateLabel($oLangStrings.about.dev & ":", 95 * $dscale, 69 * $dscale, 75 * $dscale, -1, $SS_RIGHT)
56 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
57 | GUICtrlCreateLabel($winVersion, 174 * $dscale, 38 * $dscale, 75 * $dscale, -1)
58 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
59 | GUICtrlCreateLabel($winDate, 174 * $dscale, 53 * $dscale, 75 * $dscale, -1)
60 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
61 | GUICtrlCreateLabel("Kurtis Liggett", 174 * $dscale, 69 * $dscale, 75 * $dscale, -1)
62 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
63 |
64 | GUICtrlCreateLabel($oLangStrings.about.lic & ":", 95 * $dscale, 84 * $dscale, 75 * $dscale, -1, $SS_RIGHT)
65 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
66 | GUICtrlCreateLabel("GNU GPL v3", 174 * $dscale, 84 * $dscale, 75 * $dscale, -1)
67 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
68 |
69 | $desc = $oLangStrings.about.desc
70 | GUICtrlCreateLabel($desc, 8, 110 * $dscale, $w - 16, 50 * $dscale)
71 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
72 |
73 | ; bottom section
74 |
75 | $bt_AboutOk = GUICtrlCreateButton($oLangStrings.buttonOK, $w - 55 * $dScale, $h - 27 * $dScale, 50 * $dScale, 22 * $dScale)
76 | GUICtrlSetOnEvent(-1, "_onExitChild")
77 |
78 | GUISetState(@SW_DISABLE, $hgui)
79 | GUISetState(@SW_SHOW, $AboutChild)
80 | EndFunc ;==>_form_about
81 |
--------------------------------------------------------------------------------
/forms/_form_blacklist.au3:
--------------------------------------------------------------------------------
1 | ; -----------------------------------------------------------------------------
2 | ; This file is part of Simple IP Config.
3 | ;
4 | ; Simple IP Config is free software: you can redistribute it and/or modify
5 | ; it under the terms of the GNU General Public License as published by
6 | ; the Free Software Foundation, either version 3 of the License, or
7 | ; (at your option) any later version.
8 | ;
9 | ; Simple IP Config is distributed in the hope that it will be useful,
10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | ; GNU General Public License for more details.
13 | ;
14 | ; You should have received a copy of the GNU General Public License
15 | ; along with Simple IP Config. If not, see .
16 | ; -----------------------------------------------------------------------------
17 |
18 | Func _form_blacklist()
19 | $sBlacklist = $options.AdapterBlacklist
20 | Local $aBlacklist = StringSplit($sBlacklist, "|", 2)
21 |
22 | $w = 275 * $dScale
23 | $h = 300 * $dScale
24 |
25 | $currentWinPos = WinGetPos($hgui)
26 | $x = $currentWinPos[0] + $guiWidth * $dscale / 2 - $w / 2
27 | $y = $currentWinPos[1] + $guiHeight * $dscale / 2 - $h / 2
28 |
29 | $blacklistChild = GUICreate($oLangStrings.blacklist.title, $w, $h, $x, $y, $WS_CAPTION, -1, $hgui)
30 | GUISetOnEvent($GUI_EVENT_CLOSE, "_onExitChild")
31 | GUISetFont($MyGlobalFontSize, -1, -1, $MyGlobalFontName)
32 |
33 | GUICtrlCreateLabel("", 0, 0, $w, $h - 32 * $dscale)
34 | GUICtrlSetState(-1, $GUI_DISABLE)
35 | GUICtrlSetBkColor(-1, 0xFFFFFF)
36 |
37 | GUICtrlCreateLabel("", 0, $h - 32 * $dscale, $w, 1)
38 | GUICtrlSetBkColor(-1, 0x000000)
39 |
40 | $labelTitle = GUICtrlCreateLabel($oLangStrings.blacklist.heading, 5, 5, $w - 10, 20 * $dscale)
41 | ;~ GUICtrlSetColor(-1, 0x0000FF)
42 | GUICtrlSetBkColor(-1, 0xFFFFFF)
43 | GUICtrlSetFont(-1, 12)
44 |
45 | ;~ $labelTitleLine = GUICtrlCreateLabel("", 2, 20*$dscale+5+3, $w-4, 1)
46 | ;~ GUICtrlSetBkColor (-1, 0x999999)
47 |
48 | $blacklistLV = GUICtrlCreateListView("Adapter Name", 5, 35 * $dscale, $w - 10, $h - 35 * $dscale - 35 * $dscale, BitOR($GUI_SS_DEFAULT_LISTVIEW, $LVS_NOCOLUMNHEADER), $LVS_EX_CHECKBOXES)
49 | GUICtrlSetBkColor($blacklistLV, 0xFFFFFF)
50 | _GUICtrlListView_SetColumnWidth($blacklistLV, 0, $w - 20 * $dscale) ; sets column width
51 | Local $aAdapters = Adapter_GetNames($adapters)
52 | $numAdapters = UBound($aAdapters)
53 | If $numAdapters > 0 Then
54 | For $i = 0 To $numAdapters - 1
55 | GUICtrlCreateListViewItem($aAdapters[$i], $blacklistLV)
56 | If _ArraySearch($aBlacklist, $aAdapters[$i]) <> -1 Then
57 | _GUICtrlListView_SetItemChecked($blacklistLV, $i)
58 | EndIf
59 | Next
60 | EndIf
61 |
62 | $bt_Ok = GUICtrlCreateButton($oLangStrings.buttonSave, $w - 20 * $dScale - 75 * $dScale, $h - 27 * $dScale, 75 * $dScale, 22 * $dScale)
63 | GUICtrlSetOnEvent(-1, "_onExitBlacklistOk")
64 | $bt_Cancel = GUICtrlCreateButton($oLangStrings.buttonCancel, $w - 20 * $dScale - 75 * $dScale * 2 - 5, $h - 27 * $dScale, 75 * $dScale, 22 * $dScale)
65 | GUICtrlSetOnEvent(-1, "_onExitChild")
66 |
67 | GUICtrlSetState($bt_Cancel, $GUI_FOCUS)
68 |
69 | GUISetState(@SW_DISABLE, $hgui)
70 | GUISetState(@SW_SHOW, $blacklistChild)
71 |
72 | Send("{END}")
73 | EndFunc ;==>_form_blacklist
74 |
75 |
76 | ;------------------------------------------------------------------------------
77 | ; Title........: _onExitBlacklistOk
78 | ; Description..: save the the Blacklist child window data,
79 | ; then call the exit function
80 | ; Events.......: Blacklist window 'Save' button
81 | ;------------------------------------------------------------------------------
82 | Func _onExitBlacklistOk()
83 | $guiState = WinGetState($hgui)
84 | $newBlacklist = ""
85 | $itemCount = _GUICtrlListView_GetItemCount($blacklistLV)
86 |
87 | For $i = 0 To $itemCount - 1
88 | If _GUICtrlListView_GetItemChecked($blacklistLV, $i) Then
89 | $newBlacklist &= _GUICtrlListView_GetItemTextString($blacklistLV, $i) & "|"
90 | EndIf
91 | Next
92 | $newBlacklist = StringLeft($newBlacklist, StringLen($newBlacklist) - 1)
93 |
94 | $newBlacklist = iniNameEncode($newBlacklist)
95 | $options.AdapterBlacklist = $newBlacklist
96 | IniWrite($sProfileName, "options", "AdapterBlacklist", $options.AdapterBlacklist)
97 |
98 | _ExitChild(@GUI_WinHandle)
99 | _updateCombo()
100 | EndFunc ;==>_onExitBlacklistOk
101 |
--------------------------------------------------------------------------------
/forms/_form_changelog.au3:
--------------------------------------------------------------------------------
1 | ; -----------------------------------------------------------------------------
2 | ; This file is part of Simple IP Config.
3 | ;
4 | ; Simple IP Config is free software: you can redistribute it and/or modify
5 | ; it under the terms of the GNU General Public License as published by
6 | ; the Free Software Foundation, either version 3 of the License, or
7 | ; (at your option) any later version.
8 | ;
9 | ; Simple IP Config is distributed in the hope that it will be useful,
10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | ; GNU General Public License for more details.
13 | ;
14 | ; You should have received a copy of the GNU General Public License
15 | ; along with Simple IP Config. If not, see .
16 | ; -----------------------------------------------------------------------------
17 |
18 | Func _form_changelog()
19 | $w = 400 * $dScale
20 | $h = 410 * $dScale
21 |
22 | $currentWinPos = WinGetPos($hgui)
23 | $x = $currentWinPos[0] + $guiWidth * $dscale / 2 - $w / 2
24 | $y = $currentWinPos[1] + $guiHeight * $dscale / 2 - $h / 2
25 |
26 | $changeLogChild = GUICreate($oLangStrings.changelog.changelog, $w, $h, $x, $y, $WS_CAPTION, -1, $hgui)
27 | GUISetOnEvent($GUI_EVENT_CLOSE, "_onExitChild")
28 | GUISetFont($MyGlobalFontSize, -1, -1, $MyGlobalFontName)
29 |
30 | GUICtrlCreateLabel("", 0, 0, $w, $h - 32 * $dscale)
31 | GUICtrlSetState(-1, $GUI_DISABLE)
32 | GUICtrlSetBkColor(-1, 0xFFFFFF)
33 |
34 | GUICtrlCreateLabel("", 0, $h - 32 * $dscale, $w, 1)
35 | GUICtrlSetBkColor(-1, 0x000000)
36 |
37 | Local $sChangelog = GetChangeLogData()
38 |
39 | Local $edit = _GUICtrlRichEdit_Create($changeLogChild, "", 5, 5, $w - 10, $h - 37 * $dscale - 10, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL, $ES_READONLY), 0)
40 | _GUICtrlRichEdit_SetText($edit, _changelog_getData())
41 |
42 | Local $bt_Ok = GUICtrlCreateButton($oLangStrings.buttonOK, $w - 55 * $dScale, $h - 27 * $dScale, 50 * $dScale, 22 * $dScale)
43 | GUICtrlSetOnEvent(-1, "_onExitChild")
44 |
45 | GUISetState(@SW_DISABLE, $hgui)
46 | GUISetState(@SW_SHOW, $changeLogChild)
47 |
48 | ;~ Send("^{HOME}")
49 | EndFunc ;==>_form_changelog
50 |
51 |
52 | ;------------------------------------------------------------------------------
53 | ; Title...........: _changelog_getData
54 | ; Description.....: Get the change log string data
55 | ;
56 | ; Parameters......:
57 | ; Return value....: change log string array
58 | ;------------------------------------------------------------------------------
59 | Func _changelog_getData()
60 | #Tidy_Off
61 | ;disable formatting here
62 | Local $sData
63 |
64 | $sData = _changelog_formatVersion($winVersion)
65 | $sData &= _changelog_formatHeading(0, "BUG FIXES:")
66 | $sData &= _changelog_formatItem("#178 Error running from shortcut.")
67 | $sData &= _changelog_formatItem("#186 Wrong adapter selected.")
68 | $sData &= _changelog_formatItem("Domain name not updated after selecting language.")
69 | $sData &= _changelog_formatItem("Miscellaneous DPI scaling bugs.")
70 | $sData &= _changelog_formatHeading(1, "NEW FEATURES:")
71 | $sData &= _changelog_formatItem('#118 Added memo field to store notes per profile.')
72 | $sData &= _changelog_formatItem("#171 Added ability to resize the window.")
73 | $sData &= _changelog_formatItem('#175 Added "Dark" mode under View->Appearance menu.')
74 |
75 | $sData &= _changelog_formatPrevVersion("2.9.7")
76 | $sData &= _changelog_formatHeading(0, "BUG FIXES:")
77 | $sData &= _changelog_formatItem("#141 Behavior when adapter does not exist.")
78 | $sData &= _changelog_formatItem("#157 Save profiles in portable directory (auto-detect).")
79 | $sData &= _changelog_formatItem("#166 Workgroup incorrect text.")
80 | $sData &= _changelog_formatItem("#167 Refresh button does nothing.")
81 | $sData &= _changelog_formatItem("#169 Error reading language file.")
82 | $sData &= _changelog_formatHeading(1, "NEW FEATURES:")
83 | $sData &= _changelog_formatItem("#123 Added copy/paste buttons to IP addresses.")
84 | $sData &= _changelog_formatItem("#163 Close to system tray.")
85 | $sData &= _changelog_formatItem("#164 Auto expand larger error popup messages.")
86 |
87 | $sData &= _changelog_formatPrevVersion("v2.9.6")
88 | $sData &= _changelog_formatHeading(0, "BUG FIXES:")
89 | $sData &= _changelog_formatItem("Internal issues with array handling. (affected lots of things).")
90 | $sData &= _changelog_formatItem("#152 Program antivirus false-positive.")
91 |
92 | $sData &= _changelog_formatPrevVersion("v2.9.5")
93 | $sData &= _changelog_formatHeading(0, "BUG FIXES:")
94 | $sData &= _changelog_formatItem("#150 Fixed issue - Sort profiles crashed and deleted all profiles.")
95 | $sData &= _changelog_formatItem("#148 Fixed issue - Apply button text language.")
96 |
97 | $sData &= _changelog_formatPrevVersion("v2.9.4")
98 | $sData &= _changelog_formatHeading(0, "BUG FIXES:")
99 | $sData &= _changelog_formatItem("#143 Fixed issue - crash on TAB key while renaming.")
100 | $sData &= _changelog_formatItem("#103 COM Error 80020009 checking for updates.")
101 | $sData &= _changelog_formatItem("Bug creating new profiles from scratch.")
102 | $sData &= _changelog_formatHeading(1, "NEW FEATURES:")
103 | $sData &= _changelog_formatItem("#117 Added multi-language support.")
104 | $sData &= _changelog_formatItem("#99 Added ability to open, import, and export profiles.")
105 | $sData &= _changelog_formatItem("Added menu item to open network connections.")
106 | $sData &= _changelog_formatItem("Added menu item to go to profiles.ini location.")
107 | $sData &= _changelog_formatItem("Select subnet when tabbing from IP.")
108 | $sData &= _changelog_formatItem("#43 Escape key will no longer close the program.")
109 | $sData &= _changelog_formatItem("#104 Bring to foreground if already running.")
110 | $sData &= _changelog_formatHeading(1, "MAINT:")
111 | $sData &= _changelog_formatItem("Updated layout.")
112 | $sData &= _changelog_formatItem("New toolbar icons.")
113 | $sData &= _changelog_formatItem("Updated check for updates functionality.")
114 | $sData &= _changelog_formatItem("Moved profiles.ini to local AppData")
115 | $sData &= _changelog_formatItem("Removed shortcut Ctrl+c to prevent accidental clear")
116 | $sData &= _changelog_formatItem("Code redesigned.")
117 |
118 | $sData &= _changelog_formatPrevVersion("v2.9.3")
119 | $sData &= _changelog_formatHeading(0, "BUG FIXES:")
120 | $sData &= _changelog_formatItem("#80 Bad automatic update behavior.")
121 | $sData &= _changelog_formatHeading(1, "NEW FEATURES:")
122 | $sData &= _changelog_formatItem("#80 Better update handling / new dialog.")
123 |
124 | $sData &= _changelog_formatPrevVersion("v2.9.2")
125 | $sData &= _changelog_formatHeading(0, "BUG FIXES:")
126 | $sData &= _changelog_formatItem("#75 After search, profiles don't load.")
127 | $sData &= _changelog_formatHeading(1, "NEW FEATURES:")
128 | $sData &= _changelog_formatItem("#36 Better hide adapters popup selection.")
129 |
130 | $sData &= _changelog_formatPrevVersion("v2.9.1")
131 | $sData &= _changelog_formatHeading(0, "BUG FIXES:")
132 | $sData &= _changelog_formatItem("#71 COM error when no internet connection.")
133 |
134 | $sData &= _changelog_formatPrevVersion("v2.9")
135 | $sData &= _changelog_formatHeading(0, "NEW FEATURES:")
136 | $sData &= _changelog_formatItem("#4 Create desktop shortcuts to profiles")
137 | $sData &= _changelog_formatItem("#15 Automatic Updates")
138 | $sData &= _changelog_formatItem("#7 Added Debug item to Help menu for troubleshooting issues.")
139 | $sData &= _changelog_formatHeading(1, "MAJOR CHANGES:")
140 | $sData &= _changelog_formatItem("Major code improvements")
141 | $sData &= _changelog_formatHeading(1, "BUG FIXES:")
142 | $sData &= _changelog_formatItem("#3 Setting profiles when profiles.ini is out of order.")
143 | $sData &= _changelog_formatItem("#3 Setting profiles after drag-and-drop to rearrange.")
144 | $sData &= _changelog_formatItem("#13 Issue opening the program two times.")
145 | $sData &= _changelog_formatItem("#19 Program starts off screen with dual screens.")
146 | $sData &= _changelog_formatItem("#22 Program crashes on Delete.")
147 | $sData &= _changelog_formatItem("#23 Profile '0' created unintentionally.")
148 | $sData &= _changelog_formatItem("#24 Double-clicking profiles behavior.")
149 | $sData &= _changelog_formatItem("#25 Adapters not showing up with underscore.")
150 | $sData &= _changelog_formatItem("#26 Left-handed mouse could not select profiles.")
151 | $sData &= _changelog_formatItem("#35 Hide adapters broken.")
152 | $sData &= _changelog_formatItem("#39/40 Sort profiles broken.")
153 | $sData &= _changelog_formatItem("#42 Issue with checking for updates.")
154 | $sData &= _changelog_formatItem("#44 Help menu link to documentation.")
155 | $sData &= _changelog_formatItem("#45 Added menu mnemonics (access keys).")
156 | $sData &= _changelog_formatItem("#47 Fixed message on duplicate IP address.")
157 |
158 | $sData &= _changelog_formatPrevVersion("v2.8.1")
159 | $sData &= _changelog_formatHeading(0, "BUG FIXES:")
160 | $sData &= _changelog_formatItem("IP address entry text scaling")
161 |
162 | $sData &= _changelog_formatPrevVersion("v2.8")
163 | $sData &= _changelog_formatHeading(0, "MAJOR CHANGES:")
164 | $sData &= _changelog_formatItem("Now using IP Helper API (Iphlpapi.dll) instead of WMI")
165 | $sData &= _changelog_formatItem("Speed improvements -> 2x faster!")
166 | $sData &= _changelog_formatHeading(1, "MINOR CHANGES:")
167 | $sData &= _changelog_formatItem("Automatically fill in 255.255.255.0 for subnet")
168 | $sData &= _changelog_formatItem("Save last window position on exit")
169 | $sData &= _changelog_formatItem("Tray message when an trying to start a new instance")
170 | $sData &= _changelog_formatItem("Smaller exe file size")
171 | $sData &= _changelog_formatItem("Popup window positioning follows main window")
172 | $sData &= _changelog_formatItem("Allow more space for current properties")
173 | $sData &= _changelog_formatItem("Smoother startup process")
174 | $sData &= _changelog_formatItem("Get current information from disconnected adapters")
175 | $sData &= _changelog_formatHeading(1, "BUG FIXES:")
176 | $sData &= _changelog_formatItem("IP address entry text scaling")
177 | $sData &= _changelog_formatItem("Fixed 'start in system tray' setting")
178 | $sData &= _changelog_formatItem("Fixed starting without toolbar icons")
179 | $sData &= _changelog_formatItem("Display disabled adapters")
180 | $sData &= _changelog_formatItem("Get current properties from disabled adapters")
181 | $sData &= _changelog_formatItem("Disabled adapters behavior")
182 | $sData &= _changelog_formatItem("Fixed hanging on setting profiles")
183 | $sData &= _changelog_formatItem("Fixed renaming/creating profiles issues")
184 | $sData &= _changelog_formatItem("Fixed additional DPI scaling issues")
185 |
186 | $sData &= _changelog_formatPrevVersion("v2.7")
187 | $sData &= _changelog_formatHeading(0, "MAJOR CHANGES:")
188 | $sData &= _changelog_formatItem("Code switched back to AutoIt")
189 | $sData &= _changelog_formatItem("Proper DPI scaling")
190 | $sData &= _changelog_formatHeading(1, "NEW FEATURES:")
191 | $sData &= _changelog_formatItem("Enable DNS address registration")
192 | $sData &= _changelog_formatItem("Hide unused adapters" & "(View->Hide adapters)")
193 | $sData &= _changelog_formatItem("Display computer name and domain address")
194 | $sData &= _changelog_formatHeading(1, "OTHER CHANGES:")
195 | $sData &= _changelog_formatItem("Single click to restore from system tray")
196 | $sData &= _changelog_formatItem("Improved status bar")
197 | $sData &= _changelog_formatItem("Allow only 1 instance to run")
198 | $sData &= _changelog_formatHeading(1, "BUG FIXES:")
199 | $sData &= _changelog_formatItem("Proper scaling with larger/smaller screen fonts")
200 | $sData &= _changelog_formatItem("Fixed tooltip in system tray")
201 |
202 | $sData &= _changelog_formatPrevVersion("v2.6")
203 | $sData &= _changelog_formatHeading(0, "NEW FEATURES:")
204 | $sData &= _changelog_formatItem("Filter Profiles!")
205 | $sData &= _changelog_formatItem("'Start in System Tray' setting")
206 | $sData &= _changelog_formatItem("Release / renew DHCP tool")
207 | $sData &= _changelog_formatItem("'Saveas' button is now 'New' button")
208 | $sData &= _changelog_formatHeading(1, "OTHER CHANGES:")
209 | $sData &= _changelog_formatItem("Enhanced 'Rename' interface")
210 | $sData &= _changelog_formatItem("New layout to show more profiles")
211 | $sData &= _changelog_formatItem("Other GUI enhancements")
212 | $sData &= _changelog_formatHeading(1, "BUG FIXES:")
213 | $sData &= _changelog_formatItem("Detect no IP address / subnet input")
214 | $sData &= _changelog_formatItem("Fix DNS error occurring on some systems")
215 | $sData &= _changelog_formatItem("Better detection of duplicate profile names")
216 |
217 | $sData &= "\line}"
218 |
219 | Return $sData
220 | #Tidy_On
221 | EndFunc ;==>_changelog_getData
222 |
223 | Func _changelog_formatVersion($sText)
224 | Local $data = "" & _
225 | "{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}{\f1\fnil\fcharset2 Symbol;}}" & @CRLF & _
226 | "{\colortbl ;\red0\green77\blue187;\red63\green63\blue63;}" & @CRLF & _
227 | "{\*\generator Riched20 10.0.19041}\viewkind4\uc1 " & @CRLF & _
228 | "\pard\sl240\slmult1\cf1\b\f0\fs36\lang9 " & $sText & "\par" & @CRLF & _
229 | "\cf0\b0\fs22\par" & @CRLF
230 |
231 | Return $data
232 | EndFunc ;==>_changelog_formatVersion
233 |
234 | Func _changelog_formatPrevVersion($sText)
235 | Local $data = "" & _
236 | "\pard\sl240\slmult1\cf2\fs22 ____________________________________________________\line\line\b\fs24 " & $sText & "\par" & @CRLF & _
237 | "\b0\fs22\par" & @CRLF
238 |
239 | Return $data
240 | EndFunc ;==>_changelog_formatPrevVersion
241 |
242 | Func _changelog_formatHeading($bAdd, $sText)
243 | Local $data = ""
244 |
245 | If $bAdd Then
246 | $data &= "\pard\sl240\slmult1\par" & @CRLF
247 | EndIf
248 |
249 | $data &= "\cf2\b " & $sText & "\par" & @CRLF
250 |
251 | Return $data
252 | EndFunc ;==>_changelog_formatHeading
253 |
254 | Func _changelog_formatItem($sText)
255 | Local $data = "" & _
256 | "\pard{\pntext\f1\'B7\tab}{\*\pn\pnlvlblt\pnf1\pnindent0{\pntxtb\'B7}}\fi-180\li360\sl240\slmult1\b0\fs20 " & $sText & "\par" & @CRLF
257 |
258 | Return $data
259 | EndFunc ;==>_changelog_formatItem
260 |
261 |
262 |
263 | ;------------------------------------------------------------------------------
264 | ; Title...........: GetChangeLogData
265 | ; Description.....: Get the change log string data
266 | ;
267 | ; Parameters......:
268 | ; Return value....: change log string array
269 | ;------------------------------------------------------------------------------
270 | Func GetChangeLogData()
271 | Local $sChangelog[2]
272 | ;"v"&$winVersion & @CRLF & _
273 | $sChangelog[0] = $oLangStrings.changelog.changelog & " - " & $winVersion
274 | $sChangelog[1] = @CRLF & _
275 | "BUG FIXES:" & @CRLF & _
276 | " #178 Error running from shortcut." & @CRLF & _
277 | " #186 Wrong adapter selected." & @CRLF & _
278 | " Domain name not updated after selecting language." & @CRLF & _
279 | " Miscellaneous DPI scaling bugs." & @CRLF & _
280 | "NEW FEATURES:" & @CRLF & _
281 | ' #171 Added ability to resize the main window.' & @CRLF & _
282 | ' #175 Added "Dark" mode under View->Appearance menu.' & @CRLF & _
283 | '____________________________________________________' & @CRLF & _
284 | @CRLF & _
285 | "v2.9.7" & @CRLF & _
286 | "BUG FIXES:" & @CRLF & _
287 | " #141 Behavior when adapter does not exist." & @CRLF & _
288 | " #157 Save profiles in portable directory (auto-detect)." & @CRLF & _
289 | " #166 Workgroup incorrect text." & @CRLF & _
290 | " #167 Refresh button does nothing." & @CRLF & _
291 | " #169 Error reading language file." & @CRLF & _
292 | "NEW FEATURES:" & @CRLF & _
293 | " #123 Added copy/paste buttons to IP addresses." & @CRLF & _
294 | " #163 Close to system tray." & @CRLF & _
295 | " #164 Auto expand larger error popup messages." & @CRLF & _
296 | @CRLF & _
297 | "v2.9.6" & @CRLF & _
298 | "BUG FIXES:" & @CRLF & _
299 | " Internal issues with array handling. (affected lots of things)." & @CRLF & _
300 | " #152 Program antivirus false-positive." & @CRLF & _
301 | @CRLF & _
302 | "v2.9.5" & @CRLF & _
303 | "BUG FIXES:" & @CRLF & _
304 | " #150 Fixed issue - Sort profiles crashed and deleted all profiles." & @CRLF & _
305 | " #148 Fixed issue - Apply button text language." & @CRLF & _
306 | @CRLF & _
307 | "v2.9.4" & @CRLF & _
308 | "BUG FIXES:" & @CRLF & _
309 | " #143 Fixed issue - crash on TAB key while renaming." & @CRLF & _
310 | " #103 COM Error 80020009 checking for updates." & @CRLF & _
311 | " Bug creating new profiles from scratch." & @CRLF & _
312 | "NEW FEATURES:" & @CRLF & _
313 | " #117 Added multi-language support." & @CRLF & _
314 | " #99 Added ability to open, import, and export profiles." & @CRLF & _
315 | " Added menu item to open network connections." & @CRLF & _
316 | " Added menu item to go to profiles.ini location." & @CRLF & _
317 | " Select subnet when tabbing from IP." & @CRLF & _
318 | " #43 Escape key will no longer close the program." & @CRLF & _
319 | " #104 Bring to foreground if already running." & @CRLF & _
320 | "MAINT:" & @CRLF & _
321 | " Updated layout." & @CRLF & _
322 | " New toolbar icons." & @CRLF & _
323 | " Updated check for updates functionality." & @CRLF & _
324 | " Moved profiles.ini to local AppData" & @CRLF & _
325 | " Removed shortcut Ctrl+c to prevent accidental clear" & @CRLF & _
326 | " Code redesigned." & @CRLF & _
327 | @CRLF & _
328 | "v2.9.3" & @CRLF & _
329 | "BUG FIXES:" & @CRLF & _
330 | " #80 Bad automatic update behavior." & @CRLF & _
331 | "NEW FEATURES:" & @CRLF & _
332 | " #80 Better update handling / new dialog." & @CRLF & _
333 | @CRLF & _
334 | "v2.9.2" & @CRLF & _
335 | "BUG FIXES:" & @CRLF & _
336 | " #75 After search, profiles don't load." & @CRLF & _
337 | "NEW FEATURES:" & @CRLF & _
338 | " #36 Better hide adapters popup selection." & @CRLF & _
339 | @CRLF & _
340 | "v2.9.1" & @CRLF & _
341 | "BUG FIXES:" & @CRLF & _
342 | " #71 COM error when no internet connection." & @CRLF & _
343 | @CRLF & _
344 | "v2.9" & @CRLF & _
345 | "NEW FEATURES:" & @CRLF & _
346 | " #4 Create desktop shortcuts to profiles" & @CRLF & _
347 | " #15 Automatic Updates" & @CRLF & _
348 | " #7 Added Debug item to Help menu for troubleshooting issues." & @CRLF & _
349 | "MAJOR CHANGES:" & @CRLF & _
350 | " Major code improvements" & @CRLF & _
351 | "BUG FIXES:" & @CRLF & _
352 | " #3 Setting profiles when profiles.ini is out of order." & @CRLF & _
353 | " #3 Setting profiles after drag-and-drop to rearrange." & @CRLF & _
354 | " #13 Issue opening the program two times." & @CRLF & _
355 | " #19 Program starts off screen with dual screens." & @CRLF & _
356 | " #22 Program crashes on Delete." & @CRLF & _
357 | " #23 Profile '0' created unintentionally." & @CRLF & _
358 | " #24 Double-clicking profiles behavior." & @CRLF & _
359 | " #25 Adapters not showing up with underscore." & @CRLF & _
360 | " #26 Left-handed mouse could not select profiles." & @CRLF & _
361 | " #35 Hide adapters broken." & @CRLF & _
362 | " #39/40 Sort profiles broken." & @CRLF & _
363 | " #42 Issue with checking for updates." & @CRLF & _
364 | " #44 Help menu link to documentation." & @CRLF & _
365 | " #45 Added menu mnemonics (access keys)." & @CRLF & _
366 | " #47 Fixed message on duplicate IP address." & @CRLF & _
367 | @CRLF & _
368 | "v2.8.1" & @CRLF & _
369 | "BUG FIXES:" & @CRLF & _
370 | " IP address entry text scaling" & @CRLF & _
371 | @CRLF & _
372 | "v2.8" & @CRLF & _
373 | "MAJOR CHANGES:" & @CRLF & _
374 | " Now using IP Helper API (Iphlpapi.dll) instead of WMI" & @CRLF & _
375 | " Speed improvements -> 2x faster!" & @CRLF & _
376 | @CRLF & _
377 | "MINOR CHANGES:" & @CRLF & _
378 | " Automatically fill in 255.255.255.0 for subnet" & @CRLF & _
379 | " Save last window position on exit" & @CRLF & _
380 | " Tray message when an trying to start a new instance" & @CRLF & _
381 | " Smaller exe file size" & @CRLF & _
382 | " Popup window positioning follows main window" & @CRLF & _
383 | " Allow more space for current properties" & @CRLF & _
384 | " Smoother startup process" & @CRLF & _
385 | " Get current information from disconnected adapters" & @CRLF & _
386 | @CRLF & _
387 | "BUG FIXES:" & @CRLF & _
388 | " IP address entry text scaling" & @CRLF & _
389 | " Fixed 'start in system tray' setting" & @CRLF & _
390 | " Fixed starting without toolbar icons" & @CRLF & _
391 | " Display disabled adapters" & @CRLF & _
392 | " Get current properties from disabled adapters" & @CRLF & _
393 | " Disabled adapters behavior" & @CRLF & _
394 | " Fixed hanging on setting profiles" & @CRLF & _
395 | " Fixed renaming/creating profiles issues" & @CRLF & _
396 | " Fixed additional DPI scaling issues" & @CRLF & _
397 | @CRLF & _
398 | "v2.7" & @CRLF & _
399 | "MAJOR CHANGES:" & @CRLF & _
400 | " Code switched back to AutoIt" & @CRLF & _
401 | " Proper DPI scaling" & @CRLF & _
402 | @CRLF & _
403 | "NEW FEATURES:" & @CRLF & _
404 | " Enable DNS address registration" & @CRLF & _
405 | " Hide unused adapters" & "(View->Hide adapters)" & @CRLF & _
406 | " Display computer name and domain address" & @CRLF & _
407 | @CRLF & _
408 | "OTHER CHANGES:" & @CRLF & _
409 | " Single click to restore from system tray" & @CRLF & _
410 | " Improved status bar" & @CRLF & _
411 | " Allow only 1 instance to run" & @CRLF & _
412 | @CRLF & _
413 | "BUG FIXES:" & @CRLF & _
414 | " Proper scaling with larger/smaller screen fonts" & @CRLF & _
415 | " Fixed tooltip in system tray" & @CRLF & _
416 | @CRLF & _
417 | "v2.6" & @CRLF & _
418 | "NEW FEATURES:" & @CRLF & _
419 | " Filter Profiles!" & @CRLF & _
420 | " 'Start in System Tray' setting" & @CRLF & _
421 | " Release / renew DHCP tool" & @CRLF & _
422 | " 'Saveas' button is now 'New' button" & @CRLF & _
423 | @CRLF & _
424 | "OTHER CHANGES:" & @CRLF & _
425 | " Enhanced 'Rename' interface" & @CRLF & _
426 | " New layout to show more profiles" & @CRLF & _
427 | " Other GUI enhancements" & @CRLF & _
428 | @CRLF & _
429 | "BUG FIXES:" & @CRLF & _
430 | " Detect no IP address / subnet input" & @CRLF & _
431 | " Fix DNS error occurring on some systems" & @CRLF & _
432 | " Better detection of duplicate profile names" & @CRLF
433 |
434 | Return $sChangelog
435 | EndFunc ;==>GetChangeLogData
436 |
--------------------------------------------------------------------------------
/forms/_form_debug.au3:
--------------------------------------------------------------------------------
1 | ; -----------------------------------------------------------------------------
2 | ; This file is part of Simple IP Config.
3 | ;
4 | ; Simple IP Config is free software: you can redistribute it and/or modify
5 | ; it under the terms of the GNU General Public License as published by
6 | ; the Free Software Foundation, either version 3 of the License, or
7 | ; (at your option) any later version.
8 | ;
9 | ; Simple IP Config is distributed in the hope that it will be useful,
10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | ; GNU General Public License for more details.
13 | ;
14 | ; You should have received a copy of the GNU General Public License
15 | ; along with Simple IP Config. If not, see .
16 | ; -----------------------------------------------------------------------------
17 |
18 | Func _form_debug()
19 | $w = 305 * $dScale
20 | $h = 410 * $dScale
21 |
22 | $currentWinPos = WinGetPos($hgui)
23 | $x = $currentWinPos[0] + $guiWidth * $dscale / 2 - $w / 2
24 | $y = $currentWinPos[1] + $guiHeight * $dscale / 2 - $h / 2
25 |
26 | $debugChild = GUICreate("Debug Information", $w, $h, $x, $y, $WS_CAPTION, -1, $hgui)
27 | GUISetOnEvent($GUI_EVENT_CLOSE, "_onExitChild")
28 | GUISetFont($MyGlobalFontSize, -1, -1, $MyGlobalFontName)
29 |
30 | GUICtrlCreateLabel("", 0, 0, $w, $h - 32 * $dscale)
31 | GUICtrlSetState(-1, $GUI_DISABLE)
32 | GUICtrlSetBkColor(-1, 0xFFFFFF)
33 |
34 | GUICtrlCreateLabel("", 0, $h - 32 * $dscale, $w, 1)
35 | GUICtrlSetBkColor(-1, 0x000000)
36 |
37 | $debuginfo = ""
38 | $debuginfo &= "OS Version:" & @TAB & @OSVersion & @CRLF
39 | $debuginfo &= "OS Service Pack:" & @TAB & @OSServicePack & @CRLF
40 | $debuginfo &= "OS Build:" & @TAB & @TAB & @OSBuild & @CRLF
41 | $debuginfo &= "OS Lang Code:" & @TAB & @OSLang & @CRLF
42 | $debuginfo &= "OS Architecture:" & @TAB & @OSArch & @CRLF
43 | $debuginfo &= "CPU Architecture:" & @TAB & @CPUArch & @CRLF
44 | $debuginfo &= "Resolution:" & @TAB & _WinAPI_GetSystemMetrics($SM_CXSCREEN) & "x" & _WinAPI_GetSystemMetrics($SM_CYSCREEN) & @CRLF
45 | $debuginfo &= "DPI:" & @TAB & @TAB & $iDPI & @CRLF
46 |
47 | $edit = GUICtrlCreateEdit($debuginfo, 5, 5, $w - 10, $h - 37 * $dscale - 5, BitOR($ES_READONLY, $WS_VSCROLL, $ES_AUTOVSCROLL), $WS_EX_TRANSPARENT)
48 | GUICtrlSetBkColor($edit, 0xFFFFFF)
49 | GUICtrlSetFont(-1, 8.5)
50 |
51 | $bt_Ok = GUICtrlCreateButton("OK", $w - 55 * $dScale, $h - 27 * $dScale, 50 * $dScale, 22 * $dScale)
52 | GUICtrlSetOnEvent(-1, "_onExitChild")
53 |
54 | GUISetState(@SW_DISABLE, $hgui)
55 | GUISetState(@SW_SHOW, $debugChild)
56 |
57 | Send("^{HOME}")
58 | EndFunc ;==>_debugWindow
59 |
--------------------------------------------------------------------------------
/forms/_form_error.au3:
--------------------------------------------------------------------------------
1 | ; -----------------------------------------------------------------------------
2 | ; This file is part of Simple IP Config.
3 | ;
4 | ; Simple IP Config is free software: you can redistribute it and/or modify
5 | ; it under the terms of the GNU General Public License as published by
6 | ; the Free Software Foundation, either version 3 of the License, or
7 | ; (at your option) any later version.
8 | ;
9 | ; Simple IP Config is distributed in the hope that it will be useful,
10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | ; GNU General Public License for more details.
13 | ;
14 | ; You should have received a copy of the GNU General Public License
15 | ; along with Simple IP Config. If not, see .
16 | ; -----------------------------------------------------------------------------
17 |
18 | Func _form_error($errMessage, $errNumber = 0)
19 | Local $w = 275 * $dScale
20 | Local $h = 200 * $dScale
21 |
22 | Local $x = @DesktopWidth / 2 - $w / 2
23 | Local $y = @DesktopHeight / 2 - $h / 2
24 |
25 | If Not BitAND(WinGetState($hgui), $WIN_STATE_MINIMIZED) Then
26 | $currentWinPos = WinGetPos($hgui)
27 | $x = $currentWinPos[0] + $guiWidth * $dscale / 2 - $w / 2
28 | $y = $currentWinPos[1] + $guiHeight * $dscale / 2 - $h / 2
29 | EndIf
30 |
31 | Local $hChild = GUICreate($oLangStrings.message.error, $w, $h, $x, $y, $WS_CAPTION, -1, $hgui)
32 | GUISetOnEvent($GUI_EVENT_CLOSE, "_onExitChild")
33 | GUISetFont($MyGlobalFontSize, -1, -1, $MyGlobalFontName)
34 |
35 | ; top section
36 |
37 | GUICtrlCreateLabel("", 0, 0, $w, $h - 32 * $dscale)
38 | GUICtrlSetBkColor(-1, 0xFFFFFF)
39 | GUICtrlSetState(-1, $GUI_DISABLE)
40 |
41 | GUICtrlCreateLabel("", 0, $h - 32 * $dscale, $w, 1)
42 | GUICtrlSetBkColor(-1, 0x000000)
43 |
44 | $pic = GUICtrlCreatePic("", 5 * $dScale, 6 * $dScale, 16, 16)
45 | _memoryToPic($pic, GetIconData($pngWarning))
46 |
47 | GUICtrlCreateLabel($oLangStrings.message.errorOccurred, 30 * $dscale, 5 * $dscale, 200 * $dscale)
48 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
49 | GUICtrlSetFont(-1, 13)
50 |
51 | If $errNumber <> 0 Then
52 | GUICtrlCreateLabel($oLangStrings.message.errorCode & ":", 5 * $dscale, 35 * $dscale, 75 * $dscale)
53 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
54 | GUICtrlCreateLabel($errNumber, 80 * $dscale, 35 * $dscale, 75 * $dscale)
55 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
56 | EndIf
57 |
58 | GUICtrlCreateLabel($errMessage, 5 * $dscale, 53 * $dscale, $w - 10 * $dscale, $h - 53 * $dscale - 32 * $dscale - 5 * $dscale)
59 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
60 |
61 |
62 | ; bottom section
63 |
64 | Local $bt_Ok = GUICtrlCreateButton($oLangStrings.buttonOK, $w - 55 * $dScale, $h - 27 * $dScale, 50 * $dScale, 22 * $dScale)
65 | GUICtrlSetOnEvent(-1, "_onExitChild")
66 |
67 | GUISetState(@SW_DISABLE, $hgui)
68 | GUISetState(@SW_SHOW, $hChild)
69 | EndFunc ;==>_form_error2
70 |
--------------------------------------------------------------------------------
/forms/_form_restart.au3:
--------------------------------------------------------------------------------
1 | ; -----------------------------------------------------------------------------
2 | ; This file is part of Simple IP Config.
3 | ;
4 | ; Simple IP Config is free software: you can redistribute it and/or modify
5 | ; it under the terms of the GNU General Public License as published by
6 | ; the Free Software Foundation, either version 3 of the License, or
7 | ; (at your option) any later version.
8 | ;
9 | ; Simple IP Config is distributed in the hope that it will be useful,
10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | ; GNU General Public License for more details.
13 | ;
14 | ; You should have received a copy of the GNU General Public License
15 | ; along with Simple IP Config. If not, see .
16 | ; -----------------------------------------------------------------------------
17 |
18 | Func _form_restart($langCode, $x, $y)
19 | $w = 350 * $dScale
20 | $h = 170 * $dScale
21 | $x = $x + $guiWidth / 2 - $w / 2
22 | $y = $y + $guiHeight / 2 - $h / 2
23 |
24 | $RestartChild = GUICreate("", $w, $h, $x, $y, $WS_CAPTION)
25 | GUISetOnEvent($GUI_EVENT_CLOSE, "_onExitChild")
26 | GUISetFont($MyGlobalFontSize, -1, -1, $MyGlobalFontName)
27 |
28 | ; top section
29 |
30 | GUICtrlCreateLabel("", 0, 0, $w, $h)
31 | GUICtrlSetBkColor(-1, 0xFFFFFF)
32 | GUICtrlSetState(-1, $GUI_DISABLE)
33 |
34 | Local $fileData
35 | Local $hFile = FileOpen(@ScriptDir & "\lang\lang-" & $langCode & ".json", $FO_READ)
36 | If $hFile = -1 Then
37 | If $langCode = "en-US" Then
38 | $fileData = _getEnglish()
39 | Else
40 | MsgBox(1, "Error", "Error reading language file")
41 | EndIf
42 | Else
43 | If $hFile = -1 Then
44 | MsgBox(1, "Error", "Error reading language file")
45 | EndIf
46 | $fileData = FileRead($hFile)
47 | FileClose($hFile)
48 | EndIf
49 | Local $jsonData = Json_Decode($fileData)
50 |
51 | GUICtrlCreateLabel(Json_Get($jsonData, ".strings.interface.restarting") & " Simple IP Config", 0, 0, $w, $h, BitOR($SS_CENTER, $SS_CENTERIMAGE))
52 | GUICtrlSetFont(-1, 13, 800)
53 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
54 |
55 | GUISetState(@SW_SHOW, $RestartChild)
56 | Return $RestartChild
57 | EndFunc ;==>_ShowRestart
58 |
--------------------------------------------------------------------------------
/forms/_form_settings.au3:
--------------------------------------------------------------------------------
1 | ; -----------------------------------------------------------------------------
2 | ; This file is part of Simple IP Config.
3 | ;
4 | ; Simple IP Config is free software: you can redistribute it and/or modify
5 | ; it under the terms of the GNU General Public License as published by
6 | ; the Free Software Foundation, either version 3 of the License, or
7 | ; (at your option) any later version.
8 | ;
9 | ; Simple IP Config is distributed in the hope that it will be useful,
10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | ; GNU General Public License for more details.
13 | ;
14 | ; You should have received a copy of the GNU General Public License
15 | ; along with Simple IP Config. If not, see .
16 | ; -----------------------------------------------------------------------------
17 |
18 | Func _formm_settings()
19 | $w = 335 * $dScale
20 | $h = 200 * $dScale
21 |
22 | $currentWinPos = WinGetPos($hgui)
23 | $x = $currentWinPos[0] + $guiWidth * $dscale / 2 - $w / 2
24 | $y = $currentWinPos[1] + $guiHeight * $dscale / 2 - $h / 2
25 |
26 | $settingsChild = GUICreate($oLangStrings.settings.title, $w, $h, $x, $y, $WS_CAPTION, -1, $hgui)
27 | GUISetOnEvent($GUI_EVENT_CLOSE, "_onExitChild")
28 | GUISetFont($MyGlobalFontSize, -1, -1, $MyGlobalFontName)
29 |
30 | GUICtrlCreateLabel("", 0, 0, $w, $h - 32 * $dscale)
31 | GUICtrlSetState(-1, $GUI_DISABLE)
32 | GUICtrlSetBkColor(-1, 0xFFFFFF)
33 |
34 | GUICtrlCreateLabel("", 0, $h - 32 * $dscale, $w, 1)
35 | GUICtrlSetBkColor(-1, 0x000000)
36 |
37 | $lb_language = GUICtrlCreateLabel($oLangStrings.settings.lang, 10 * $dScale, 10 * $dScale)
38 | GUICtrlSetBkColor(-1, 0xFFFFFF)
39 |
40 | Local $strOptionsLang = $options.Language
41 | Local $aLangsAvailable = _getLangsAvailable()
42 | Local $langNameStr
43 | For $i = 0 To UBound($aLangsAvailable) - 1
44 | If $aLangsAvailable[$i] <> "" Then
45 | If StringInStr($aLangsAvailable[$i], $strOptionsLang) Then
46 | $strOptionsLang = $aLangsAvailable[$i]
47 | EndIf
48 | If Not StringInStr($langNameStr, $aLangsAvailable[$i]) And $aLangsAvailable[$i] <> "English (en-US)" Then
49 | $langNameStr &= $aLangsAvailable[$i] & "|"
50 | EndIf
51 | Else
52 | ExitLoop
53 | EndIf
54 | Next
55 | $cmb_langSelect = GUICtrlCreateCombo("English (en-US)", 10 * $dScale, 28 * $dScale, $w - 20 * $dScale, -1, BitOR($CBS_DROPDOWNlist, $CBS_AUTOHSCROLL, $WS_VSCROLL))
56 | If $langNameStr <> "" Then
57 | GUICtrlSetData(-1, $langNameStr)
58 | EndIf
59 | ControlCommand($settingsChild, "", $cmb_langSelect, "SelectString", $strOptionsLang)
60 |
61 | $ck_startinTray = GUICtrlCreateCheckbox($oLangStrings.settings.opt1, 10 * $dScale, 60 * $dScale, $w - 50 * $dScale, 20 * $dScale)
62 | GUICtrlSetBkColor(-1, 0xFFFFFF)
63 | GUICtrlSetState($ck_startinTray, _StrToState($options.StartupMode))
64 | $ck_mintoTray = GUICtrlCreateCheckbox($oLangStrings.settings.opt2, 10 * $dScale, 80 * $dScale, $w - 50 * $dScale, 20 * $dScale)
65 | GUICtrlSetBkColor(-1, 0xFFFFFF)
66 | GUICtrlSetState($ck_mintoTray, _StrToState($options.MinToTray))
67 | $ck_saveAdapter = GUICtrlCreateCheckbox($oLangStrings.settings.opt3, 10 * $dScale, 100 * $dScale, $w - 50 * $dScale, 20 * $dScale)
68 | GUICtrlSetBkColor(-1, 0xFFFFFF)
69 | GUICtrlSetState($ck_saveAdapter, _StrToState($options.SaveAdapterToProfile))
70 |
71 | $ck_autoUpdate = GUICtrlCreateCheckbox($oLangStrings.settings.opt4, 10 * $dScale, 120 * $dScale, $w - 50 * $dScale, 20 * $dScale)
72 | GUICtrlSetBkColor(-1, 0xFFFFFF)
73 | GUICtrlSetState($ck_autoUpdate, _StrToState($options.AutoUpdate))
74 |
75 | $bt_optSave = GUICtrlCreateButton($oLangStrings.buttonSave, $w - 20 * $dScale - 75 * $dScale, $h - 27 * $dScale, 75 * $dScale, 22 * $dScale)
76 | GUICtrlSetOnEvent($bt_optSave, "_saveOptions")
77 | $bt_optCancel = GUICtrlCreateButton($oLangStrings.buttonCancel, $w - 20 * $dScale - 75 * $dScale * 2 - 5, $h - 27 * $dScale, 75 * $dScale, 22 * $dScale)
78 | GUICtrlSetOnEvent($bt_optCancel, "_onExitChild")
79 |
80 | GUISetState(@SW_DISABLE, $hgui)
81 | GUISetState(@SW_SHOW, $settingsChild)
82 | EndFunc ;==>_formm_settings
83 |
84 |
85 | Func _saveOptions()
86 | Local $updateGUI = 0
87 | $options.StartupMode = _StateToStr($ck_startinTray)
88 | $options.MinToTray = _StateToStr($ck_mintoTray)
89 | $options.SaveAdapterToProfile = _StateToStr($ck_saveAdapter)
90 | $options.AutoUpdate = _StateToStr($ck_autoUpdate)
91 |
92 | Local $langRet = StringLeft(StringRight(GUICtrlRead($cmb_langSelect), 6), 5)
93 | If $langRet <> -1 Then
94 | If $langRet <> $oLangStrings.OSLang Then
95 | $updateGUI = 1
96 | $oLangStrings.OSLang = $langRet
97 | $options.Language = $oLangStrings.OSLang
98 | EndIf
99 | EndIf
100 |
101 | IniWriteSection($sProfileName, "options", $options.getSection(), 0)
102 | _ExitChild(@GUI_WinHandle)
103 |
104 | If $updateGUI Then
105 | ;~ _GuiFlatToolbar_DeleteAll($oToolbar)
106 | ;~ _GuiFlatToolbar_DeleteAll($oToolbar2)
107 | GUIDelete($hgui)
108 | Local $restartGUI = _form_restart($oLangStrings.OSLang, $options.PositionX, $options.PositionY)
109 | _setLangStrings($oLangStrings.OSLang)
110 | _form_main()
111 | ;~ _updateLang()
112 | _loadAdapters()
113 | GUIDelete($restartGUI)
114 |
115 | ;Add adapters the the combobox
116 | If Not IsArray($adapters) Then
117 | MsgBox(16, $oLangStrings.message.error, $oLangStrings.message.errorRetrieving)
118 | Else
119 | Adapter_Sort($adapters) ; connections sort ascending
120 | $defaultitem = Adapter_GetName($adapters, 0)
121 | $sStartupAdapter = $options.StartupAdapter
122 | If Adapter_Exists($adapters, $sStartupAdapter) Then
123 | $defaultitem = $sStartupAdapter
124 | EndIf
125 |
126 | $sAdapterBlacklist = $options.AdapterBlacklist
127 | $aBlacklist = StringSplit($sAdapterBlacklist, "|")
128 | If IsArray($aBlacklist) Then
129 | Local $adapterNames = Adapter_GetNames($adapters)
130 | For $i = 0 To UBound($adapterNames) - 1
131 | $indexBlacklist = _ArraySearch($aBlacklist, $adapterNames[$i], 1)
132 | If $indexBlacklist <> -1 Then ContinueLoop
133 | GUICtrlSetData($combo_adapters, $adapterNames[$i], $defaultitem)
134 | Next
135 | EndIf
136 | EndIf
137 |
138 | _refresh(1)
139 | ControlListView($hgui, "", $list_profiles, "Select", 0)
140 | GUICtrlSetData($domainName, _DomainComputerBelongs())
141 | EndIf
142 | EndFunc ;==>_saveOptions
143 |
--------------------------------------------------------------------------------
/forms/_form_update.au3:
--------------------------------------------------------------------------------
1 | ; -----------------------------------------------------------------------------
2 | ; This file is part of Simple IP Config.
3 | ;
4 | ; Simple IP Config is free software: you can redistribute it and/or modify
5 | ; it under the terms of the GNU General Public License as published by
6 | ; the Free Software Foundation, either version 3 of the License, or
7 | ; (at your option) any later version.
8 | ;
9 | ; Simple IP Config is distributed in the hope that it will be useful,
10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | ; GNU General Public License for more details.
13 | ;
14 | ; You should have received a copy of the GNU General Public License
15 | ; along with Simple IP Config. If not, see .
16 | ; -----------------------------------------------------------------------------
17 |
18 | Func _form_update($thisVersion, $currentVersion, $isNew = 0)
19 | Local $bt_UpdateOk, $lb_Heading, $lb_date, $lb_version, $lb_info, $lb_sig, $pic, $lb_license, $GFLine
20 | $w = 275 * $dScale
21 | $h = 170 * $dScale
22 |
23 | If Not BitAND(WinGetState($hgui), $WIN_STATE_MINIMIZED) Then
24 | $currentWinPos = WinGetPos($hgui)
25 | $x = $currentWinPos[0] + $guiWidth * $dscale / 2 - $w / 2
26 | $y = $currentWinPos[1] + $guiHeight * $dscale / 2 - $h / 2
27 | Else
28 | $x = @DesktopWidth / 2 - $w / 2
29 | $y = @DesktopHeight / 2 - $h / 2
30 | EndIf
31 |
32 | $UpdateChild = GUICreate($oLangStrings.updates.title, $w, $h, $x, $y, $WS_CAPTION, -1, $hgui)
33 | GUISetOnEvent($GUI_EVENT_CLOSE, "_onExitChild")
34 | GUISetFont($MyGlobalFontSize, -1, -1, $MyGlobalFontName)
35 |
36 | ; top section
37 |
38 | GUICtrlCreateLabel("", 0, 0, $w, $h - 32 * $dscale)
39 | GUICtrlSetBkColor(-1, 0xFFFFFF)
40 | GUICtrlSetState(-1, $GUI_DISABLE)
41 |
42 | GUICtrlCreateLabel("", 0, $h - 32 * $dscale, $w, 1)
43 | GUICtrlSetBkColor(-1, 0x000000)
44 |
45 | $pic = GUICtrlCreatePic("", 17 * $dScale, 22 * $dScale, 64, 64)
46 | _memoryToPic($pic, GetIconData($pngBigicon))
47 |
48 | GUICtrlCreateLabel("Simple IP Config", 75 * $dscale, 10 * $dscale, 200 * $dscale, -1, $SS_CENTER)
49 | GUICtrlSetFont(-1, 13, 800)
50 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
51 | GUICtrlCreateLabel($oLangStrings.updates.thisVersion & ":", 50 * $dscale, 38 * $dscale, 120 * $dscale, -1, $SS_RIGHT)
52 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
53 | GUICtrlCreateLabel($oLangStrings.updates.latestVersion & ":", 50 * $dscale, 53 * $dscale, 120 * $dscale, -1, $SS_RIGHT)
54 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
55 | GUICtrlCreateLabel($thisVersion, 175 * $dscale, 38 * $dscale, 75 * $dscale, -1)
56 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
57 | GUICtrlCreateLabel($currentVersion, 175 * $dscale, 53 * $dscale, 75 * $dscale, -1)
58 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
59 |
60 | GUICtrlCreateLabel("", 0, 100 * $dscale, $w, 1)
61 | GUICtrlSetBkColor(-1, 0x000000)
62 |
63 | Local $descX
64 | If $isNew Then
65 | $desc = $oLangStrings.updates.newMessage
66 | $descX = 45
67 |
68 | $link = GUICtrlCreateLabel("here", 199 * $dscale, 110 * $dscale, -1, 20 * $dscale)
69 | GUICtrlSetOnEvent(-1, "_updateLink")
70 | GUICtrlSetColor(-1, 0x0000FF)
71 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
72 | GUICtrlSetFont(-1, -1, -1, $GUI_FONTUNDER)
73 | GUICtrlSetTip(-1, 'Visit: https://github.com/KurtisLiggett/Simple-IP-Config/releases/latest')
74 | GUICtrlSetCursor(-1, 0)
75 | Else
76 | $desc = $oLangStrings.updates.latestMessage
77 | $descX = 60
78 | EndIf
79 | GUICtrlCreateLabel($desc, $descX * $dscale, 110 * $dscale, $w - 20, 20 * $dscale)
80 | GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
81 |
82 | ; bottom section
83 | $bt_UpdateOk = GUICtrlCreateButton($oLangStrings.buttonOK, $w - 55 * $dScale, $h - 27 * $dScale, 50 * $dScale, 22 * $dScale)
84 | GUICtrlSetOnEvent(-1, "_onExitChild")
85 |
86 | GUISetState(@SW_DISABLE, $hgui)
87 | GUISetState(@SW_SHOW, $UpdateChild)
88 | EndFunc ;==>_form_update
89 |
--------------------------------------------------------------------------------
/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KurtisLiggett/Simple-IP-Config/eb75a70d590b7b8da57f8f4fd46be78991122b1e/icon.ico
--------------------------------------------------------------------------------
/lang/lang-de-DE.json:
--------------------------------------------------------------------------------
1 | {
2 | "language-info":{
3 | "name":"Deutsch",
4 | "code":"de-DE"
5 | },
6 | "strings":{
7 | "buttonOK":"OK",
8 | "buttonCancel":"Abbrechen",
9 | "buttonSave":"Speichern",
10 | "menu":{
11 | "file":{
12 | "file":"&Datei",
13 | "apply":"Profil &anwenden",
14 | "applyKey":"Enter",
15 | "rename":"&Umbenennen",
16 | "renameKey":"F2",
17 | "new":"&Neu",
18 | "newKey":"Strg+N",
19 | "save":"&Speichern",
20 | "saveKey":"Strg+S",
21 | "delete":"&Löschen",
22 | "deleteKey":"Entf",
23 | "clear":"Einträge &leeren",
24 | "clearKey":"Strg+C",
25 | "shortcut":"Verknüpfung für Profil erstellen",
26 | "open":"Open File",
27 | "import":"Profile importieren",
28 | "export":"Profile exportieren",
29 | "exit":"&Beenden"
30 | },
31 | "view":{
32 | "view":"&Ansicht",
33 | "refresh":"&Aktualisieren",
34 | "refreshKey":"Strg+R",
35 | "tray":"An &Tray senden",
36 | "trayKey":"Strg+T",
37 | "hide":"Adapter ausblenden",
38 | "appearance":{
39 | "appearance":"Appearance",
40 | "light":"Light",
41 | "dark":"Dark"
42 | }
43 | },
44 | "tools":{
45 | "tools":"&Werkzeuge",
46 | "netConn":"Netzwerkverbindungen öffnen",
47 | "pull":"Von Adapter be&ziehen",
48 | "pullKey":"Strg+P",
49 | "disable":"Adapter deaktivieren",
50 | "enable":"Adapter aktivieren",
51 | "release":"DHCP f&reigeben",
52 | "renew":"DHCP er&neuern",
53 | "cycle":"Freigeben/Erneuern &Zyklus",
54 | "openprofloc":"Ordner mit profiles.ini öffnen",
55 | "settings":"&Einstellungen"
56 | },
57 | "help":{
58 | "help":"&Hilfe",
59 | "docs":"&Online-Dokumentation",
60 | "docsKey":"F1",
61 | "changelog":"&Änderungsprotokoll anzeigen",
62 | "update":"Auf Akt&ualisierungen prüfen...",
63 | "debug":"&Debug-Informationen",
64 | "about":"&Über Simple IP Config"
65 | }
66 | },
67 | "traymenu":{
68 | "hide":"Ausblenden",
69 | "restore":"Wiederherstellen",
70 | "about":"Über",
71 | "exit":"Beenden"
72 | },
73 | "lvmenu":{
74 | "rename":"Umbenennen",
75 | "delete":"Löschen",
76 | "sortAsc":"Sortieren nach A->Z",
77 | "sortDesc":"Sortieren nach Z->A",
78 | "shortcut":"Verknüpfung für Profil erstellen"
79 | },
80 | "toolbar":{
81 | "apply":"Anwenden",
82 | "refresh":"Aktualisieren",
83 | "new":"Neu",
84 | "save":"Speichern",
85 | "delete":"Löschen",
86 | "clear":"Leeren",
87 | "apply_tip":"Anwenden",
88 | "refresh_tip":"Aktualisieren",
89 | "new_tip":"Neues Profil erstellen",
90 | "save_tip":"Profil speichern",
91 | "delete_tip":"Profil löschen",
92 | "clear_tip":"Einträge leeren",
93 | "settings_tip":"Einstellungen",
94 | "tray_tip":"In Tray minimieren"
95 | },
96 | "interface":{
97 | "computername":"Computername",
98 | "domain":"Domäne",
99 | "workgroup":"Arbeitsgruppe",
100 | "adapterDesc":"Beschreibung",
101 | "mac":"MAC-Adresse",
102 | "select":"Adapter auswählen",
103 | "profiles":"Profile",
104 | "profileprops":"Profile IP Properties",
105 | "currentprops":"Eigenschaften des aktuellen Adapters",
106 | "restarting":"starte neu",
107 | "props":{
108 | "ip":"IP-Adresse",
109 | "subnet":"Subnetzmaske",
110 | "gateway":"Gateway",
111 | "dnsPref":"Bevorzugter DNS-Server",
112 | "dnsAlt":"Alternativer DNS-Server",
113 | "dhcpServer":"DHCP-Server",
114 | "adapterState":"Adapterstatus",
115 | "adapterStateEnabled":"Aktiviert",
116 | "adapterStateDisabled":"Deaktiviert",
117 | "adapterStateUnplugged":"Nicht angeschlossen",
118 | "ipauto":"IP-Adresse automatisch beziehen",
119 | "ipmanual":"IP-Adresse manuell festlegen",
120 | "dnsauto":"DNS-Serveradresse automatisch beziehen",
121 | "dnsmanual":"DNS-Serveradresse manuell festlegen",
122 | "dnsreg":"Adressen registrieren",
123 | "memo":"Memo"
124 | }
125 | },
126 | "updates":{
127 | "title":"Auf Aktualisierungen prüfen",
128 | "thisVersion":"Diese Version",
129 | "latestVersion":"Letzte Version",
130 | "newMessage":"Eine neue Version ist verfügbar.",
131 | "latestMessage":"Sie verwenden die letzte Version."
132 | },
133 | "about":{
134 | "title":"Über",
135 | "version":"Version",
136 | "date":"Datum",
137 | "dev":"Entwickler",
138 | "lic":"Lizenz",
139 | "desc":"Das portable Werkzeug zum Ändern von IP-Adressen, dass es dem Benutzer erlaubt schnell und einfach die meisten Netzwerkeinstellungen zu ändern.",
140 | "icons":"Programmsymbole von"
141 | },
142 | "changelog":{
143 | "changelog":"Änderungsprotokoll"
144 | },
145 | "blacklist":{
146 | "title":"Adapter-Sperrliste",
147 | "heading":"Auszublendende Adapter auswählen"
148 | },
149 | "settings":{
150 | "title":"Einstellungen",
151 | "lang":"Sprache",
152 | "opt1":"In Tray starten",
153 | "opt2":"In Tray minimieren",
154 | "opt3":"Adapter in Profil speichern",
155 | "opt4":"Automatisch auf Aktualisierungen prüfen"
156 | },
157 | "message":{
158 | "ready":"Bereit",
159 | "timedout":"Zeitüberschreitung! Befehl abgebrochen.",
160 | "couldNotSave":"Konnte unter dem angegeben Ort nicht speichern!",
161 | "updatingList":"Liste mit Adaptern wird aktualisiert...",
162 | "selectAdapter":"Einen Adapter auswählen und erneut versuchen",
163 | "enterIP":"IP-Adresse eingeben",
164 | "enterSubnet":"Subnetzmaske eingeben",
165 | "settingIP":"statische IP-Adresse wird festgelegt...",
166 | "settingDnsDhcp":"DNS/DHCP werden festgelegt...",
167 | "settingDnsPref":"Bevorzugter DNS-Server wird festgelegt...",
168 | "settingDnsAlt":"Alternativer DNS-Server wird festgelegt...",
169 | "errorOccurred":"Ein Fehler ist aufgetreten",
170 | "profileNameExists":"Der Profilname existiert bereits!",
171 | "noProfileSel":"Kein Profil ausgewählt!",
172 | "profilesNotFound":"Profiles.ini nicht gefunden - Eine neue Datei wird erstellt",
173 | "errorReadingProf":"Fehler beim LEsen der profiles.ini",
174 | "adapterNotFound":"Adapter nicht gefunden",
175 | "error":"Fehler",
176 | "warning":"Warnung",
177 | "newItem":"Neuer Eintrag",
178 | "applying":"Profil wird angewendet",
179 | "errorRetrieving":"Bei der Abfrage der Adapter ist ein Problem aufgetreten.",
180 | "commandTimeout":"Befehlszeitüberschreitung",
181 | "updateCheckError":"Beim Abruf des Updates ist ein Fehler aufgetreten.",
182 | "checkConnect":"Bitte prüfen Sie Ihre Internetverbindung.",
183 | "errorCode":"Fehlercode",
184 | "newVersion":"Eine neue Version ist verfügbar",
185 | "currentVersion":"Sie verwenden die letzte Version.",
186 | "yourVersion":"Ihre Version ist",
187 | "latestVersion":"Letzte Version ist",
188 | "loadedFile":"Geladene Datei",
189 | "doneImporting":"Profilimportierung abgeschlossen",
190 | "fileSaved":"Datei gespeichert"
191 | },
192 | "dialog":{
193 | "selectFile":"Datei auswählen",
194 | "ini":"ini-Dateien"
195 | }
196 | }
197 | }
198 |
--------------------------------------------------------------------------------
/lang/lang-en-US.json:
--------------------------------------------------------------------------------
1 | {
2 | "language-info":{
3 | "name":"English",
4 | "code":"en-US"
5 | },
6 | "strings":{
7 | "buttonOK":"OK",
8 | "buttonCancel":"Cancel",
9 | "buttonSave":"Save",
10 | "menu":{
11 | "file":{
12 | "file":"&File",
13 | "apply":"&Apply profile",
14 | "applyKey":"Enter",
15 | "rename":"&Rename",
16 | "renameKey":"F2",
17 | "new":"&New",
18 | "newKey":"Ctrl+n",
19 | "save":"&Save",
20 | "saveKey":"Ctrl+s",
21 | "delete":"&Delete",
22 | "deleteKey":"Del",
23 | "clear":"&Clear entries",
24 | "clearKey":"Ctrl+c",
25 | "shortcut":"Create shortcut to profile",
26 | "open":"Open File",
27 | "import":"Import profiles",
28 | "export":"Export profiles",
29 | "exit":"&Exit"
30 | },
31 | "view":{
32 | "view":"&View",
33 | "refresh":"&Refresh",
34 | "refreshKey":"Ctrl+r",
35 | "tray":"Send to &tray",
36 | "trayKey":"Ctrl+t",
37 | "hide":"Hide adapters",
38 | "appearance":{
39 | "appearance":"Appearance",
40 | "light":"Light",
41 | "dark":"Dark"
42 | }
43 | },
44 | "tools":{
45 | "tools":"&Tools",
46 | "netConn":"Open Network Connections",
47 | "pull":"&Pull from adapter",
48 | "pullKey":"Ctrl+p",
49 | "disable":"Disable adapter",
50 | "enable":"Enable adapter",
51 | "release":"&Release DHCP",
52 | "renew":"Re&new DHCP",
53 | "cycle":"Release/renew &cycle",
54 | "openprofloc":"Go to profiles.ini folder",
55 | "settings":"&Settings"
56 | },
57 | "help":{
58 | "help":"&Help",
59 | "docs":"&Online Documentation",
60 | "docsKey":"F1",
61 | "changelog":"Show &Change Log",
62 | "update":"Check for &Updates...",
63 | "debug":"&Debug Information",
64 | "about":"&About Simple IP Config"
65 | }
66 | },
67 | "traymenu":{
68 | "hide":"Hide",
69 | "restore":"Restore",
70 | "about":"About",
71 | "exit":"Exit"
72 | },
73 | "lvmenu":{
74 | "rename":"Rename",
75 | "delete":"Delete",
76 | "sortAsc":"Sort A->Z",
77 | "sortDesc":"Sort Z->A",
78 | "shortcut":"Create shortcut to profile"
79 | },
80 | "toolbar":{
81 | "apply":"Apply",
82 | "refresh":"Refresh",
83 | "new":"New",
84 | "save":"Save",
85 | "delete":"Delete",
86 | "clear":"Clear",
87 | "apply_tip":"Apply",
88 | "refresh_tip":"Refresh",
89 | "new_tip":"Create new profile",
90 | "save_tip":"Save profile",
91 | "delete_tip":"Delete profile",
92 | "clear_tip":"Clear entries",
93 | "settings_tip":"Settings",
94 | "tray_tip":"Send to tray"
95 | },
96 | "interface":{
97 | "computername":"Computer name",
98 | "domain":"Domain",
99 | "workgroup":"Workgroup",
100 | "adapterDesc":"Description",
101 | "mac":"MAC Address",
102 | "select":"Select Adapter",
103 | "profiles":"Profiles",
104 | "profileprops":"Profile IP Properties",
105 | "currentprops":"Current Adapter Properties",
106 | "restarting":"Restarting",
107 | "props":{
108 | "ip":"IP Address",
109 | "subnet":"Subnet Mask",
110 | "gateway":"Gateway",
111 | "dnsPref":"Preferred DNS Server",
112 | "dnsAlt":"Alternate DNS Server",
113 | "dhcpServer":"DHCP Server",
114 | "adapterState":"Adapter State",
115 | "adapterStateEnabled":"Enabled",
116 | "adapterStateDisabled":"Disabled",
117 | "adapterStateUnplugged":"Unplugged",
118 | "ipauto":"Automatically Set IP Address",
119 | "ipmanual":"Manually Set IP Address",
120 | "dnsauto":"Automatically Set DNS Address",
121 | "dnsmanual":"Manually Set DNS Address",
122 | "dnsreg":"Register Addresses",
123 | "memo":"Memo"
124 | }
125 | },
126 | "updates":{
127 | "title":"Check for Updates",
128 | "thisVersion":"This Version",
129 | "latestVersion":"Latest Version",
130 | "newMessage":"A newer version is available.",
131 | "latestMessage":"You have the latest version."
132 | },
133 | "about":{
134 | "title":"About",
135 | "version":"Version",
136 | "date":"Date",
137 | "dev":"Developer",
138 | "lic":"License",
139 | "desc":"The portable ip changer utility that allows a user to quickly and easily change the most common network settings for any connection.",
140 | "icons":"Program icons are from"
141 | },
142 | "changelog":{
143 | "changelog":"Change Log"
144 | },
145 | "blacklist":{
146 | "title":"Adapter Blacklist",
147 | "heading":"Select Adapters to Hide"
148 | },
149 | "settings":{
150 | "title":"Settings",
151 | "lang":"Language",
152 | "opt1":"Startup in system tray",
153 | "opt2":"Minimize to the system tray",
154 | "opt3":"Save adapter to profile",
155 | "opt4":"Automatically check for updates"
156 | },
157 | "message":{
158 | "ready":"Ready",
159 | "timedout":"Action timed out! Command Aborted.",
160 | "couldNotSave":"Could not save to the selected location!",
161 | "updatingList":"Updating Adapter List...",
162 | "selectAdapter":"Select an adapter and try again",
163 | "enterIP":"Enter an IP address",
164 | "enterSubnet":"Enter a subnet mask",
165 | "settingIP":"Setting static IP address...",
166 | "settingDnsDhcp":"Setting DNS DHCP...",
167 | "settingDnsPref":"Setting preferred DNS server...",
168 | "settingDnsAlt":"Setting alternate DNS server...",
169 | "errorOccurred":"An error occurred",
170 | "profileNameExists":"The profile name already exists!",
171 | "noProfileSel":"No profile is selected!",
172 | "profilesNotFound":"Profiles.ini file not found - A new file will be created",
173 | "errorReadingProf":"Error reading profiles.ini",
174 | "adapterNotFound":"Adapter not found",
175 | "error":"Error",
176 | "warning":"Warning",
177 | "newItem":"New Item",
178 | "applying":"Applying profile",
179 | "errorRetrieving":"There was a problem retrieving the adapters.",
180 | "commandTimeout":"Command timeout",
181 | "updateCheckError":"An error was encountered while retrieving the update.",
182 | "checkConnect":"Please check your internet connection.",
183 | "errorCode":"Error code",
184 | "newVersion":"A newer version is available",
185 | "currentVersion":"You have the latest version.",
186 | "yourVersion":"Your version is",
187 | "latestVersion":"Latest version is",
188 | "loadedFile":"Loaded file",
189 | "doneImporting":"Done importing profiles",
190 | "fileSaved":"File saved"
191 | },
192 | "dialog":{
193 | "selectFile":"Select File",
194 | "ini":"INI Files"
195 | }
196 | }
197 | }
198 |
--------------------------------------------------------------------------------
/lang/lang-es-ES.json:
--------------------------------------------------------------------------------
1 | {
2 | "language-info":{
3 | "name":"Español",
4 | "code":"es-ES"
5 | },
6 | "strings":{
7 | "buttonOK":"OK",
8 | "buttonCancel":"Cancelar",
9 | "buttonSave":"Guardar",
10 | "menu":{
11 | "file":{
12 | "file":"&Archivo",
13 | "apply":"&Aplicar perfil",
14 | "applyKey":"Enter",
15 | "rename":"&Renombrar",
16 | "renameKey":"F2",
17 | "new":"&Nuevo",
18 | "newKey":"Ctrl+n",
19 | "save":"&Guardar",
20 | "saveKey":"Ctrl+s",
21 | "delete":"&Eliminar",
22 | "deleteKey":"Del",
23 | "clear":"&Limpiar Entradas",
24 | "clearKey":"Ctrl+c",
25 | "shortcut":"Crear Acceso directo a perfil",
26 | "open":"Abrir Archivo",
27 | "import":"Importar Perfil",
28 | "export":"Exportar Perfil",
29 | "exit":"&Salir"
30 | },
31 | "view":{
32 | "view":"&Ver",
33 | "refresh":"&Actualizar",
34 | "refreshKey":"Ctrl+r",
35 | "tray":"Ocultar en barra de tareas",
36 | "trayKey":"Ctrl+t",
37 | "hide":"Ocultar adaptadores",
38 | "appearance":{
39 | "appearance":"Appearance",
40 | "light":"Light",
41 | "dark":"Dark"
42 | }
43 | },
44 | "tools":{
45 | "tools":"&Herramientas",
46 | "netConn":"Abrir Conexiones de Red",
47 | "pull":"&Pull from adapter",
48 | "pullKey":"Ctrl+p",
49 | "disable":"Deshabilitar Adaptador",
50 | "enable":"Habilitar Adaptador",
51 | "release":"&Liberar DHCP (release)",
52 | "renew":"Re&novar DHCP (renew)",
53 | "cycle":"Release/renew &ciclo",
54 | "openprofloc":"Ir a carpeta profiles.ini",
55 | "settings":"&Opciones"
56 | },
57 | "help":{
58 | "help":"&Ayuda",
59 | "docs":"&Documentacion Online",
60 | "docsKey":"F1",
61 | "changelog":"Mostrar &Registro de cambios",
62 | "update":"Verificar &Actualizaciones...",
63 | "debug":"&depurar informacion",
64 | "about":"&Acerca de Simple IP Config"
65 | }
66 | },
67 | "traymenu":{
68 | "hide":"Ocultar",
69 | "restore":"Restaurar",
70 | "about":"Acerca de",
71 | "exit":"Salir"
72 | },
73 | "lvmenu":{
74 | "rename":"Renombrar",
75 | "delete":"Eliminar",
76 | "sortAsc":"Ordenar A->Z",
77 | "sortDesc":"Ordenar Z->A",
78 | "shortcut":"Crear acceso directo a perfil"
79 | },
80 | "toolbar":{
81 | "apply":"Aplicar",
82 | "refresh":"Refrescar",
83 | "new":"Nuevo",
84 | "save":"Guardar",
85 | "delete":"Eliminar",
86 | "clear":"Clear",
87 | "apply_tip":"Aplicar",
88 | "refresh_tip":"Actualizar",
89 | "new_tip":"Crear nuevo perfil",
90 | "save_tip":"Guardar Perfil",
91 | "delete_tip":"Eliminar Perfil",
92 | "clear_tip":"Limpiar Entrdas",
93 | "settings_tip":"Opciones",
94 | "tray_tip":"Ocultar en barra de escritorio"
95 | },
96 | "interface":{
97 | "computername":"Nombre Equipo",
98 | "domain":"Dominio",
99 | "workgroup":"Grupo de trabajo",
100 | "adapterDesc":"Descripcion",
101 | "mac":"Direccion MAC",
102 | "select":"Seleccionar Adaptador",
103 | "profiles":"Perfil",
104 | "profileprops":"Propiedades Perfil IP ",
105 | "currentprops":"Propiedades del adaptador actual",
106 | "restarting":"Reiniciando",
107 | "props":{
108 | "ip":"Dirección IP",
109 | "subnet":"Máscara Subnet",
110 | "gateway":"Puerta de Enlace",
111 | "dnsPref":"Servidor DNS Preferido",
112 | "dnsAlt":"Servidor DNS Alternativo",
113 | "dhcpServer":"Servidor DHCP",
114 | "adapterState":"Estado de Adaptador",
115 | "adapterStateEnabled":"Habilitado",
116 | "adapterStateDisabled":"Deshabilitado",
117 | "adapterStateUnplugged":"Desconectado",
118 | "ipauto":"Establecer automáticamente la dirección IP",
119 | "ipmanual":"Establecer manualmente la dirección IP",
120 | "dnsauto":"Establecer automáticamente la dirección DNS",
121 | "dnsmanual":"Establecer manualmente la dirección DNS",
122 | "dnsreg":"Registrar Direcciones",
123 | "memo":"Memo"
124 | }
125 | },
126 | "updates":{
127 | "title":"Buscar actualizaciones",
128 | "thisVersion":"Esta Versión",
129 | "latestVersion":"Ultima versión",
130 | "newMessage":"Una nueva versión está disponible.",
131 | "latestMessage":"Tienes la última versión."
132 | },
133 | "about":{
134 | "title":"Acerda de",
135 | "version":"Versión",
136 | "date":"Fecha",
137 | "dev":"Desarrollador",
138 | "lic":"Licencia",
139 | "desc":"La utiliad portable ip changer, permite al usuario cambiar rápida y fácilmente la configuración de red más común para cualquier conexión.",
140 | "icons":"Los íconos del programa son de"
141 | },
142 | "changelog":{
143 | "changelog":"Registro de cambios"
144 | },
145 | "blacklist":{
146 | "title":"Lista negra de adaptadores",
147 | "heading":"Seleccionar adaptadores para ocultar"
148 | },
149 | "settings":{
150 | "title":"Opciones",
151 | "lang":"Idioma",
152 | "opt1":"Inicio en la bara de escritorio",
153 | "opt2":"Minimizar a la barra de escritorio",
154 | "opt3":"Guardar adaptador en perfil",
155 | "opt4":"Buscar actualizaciones automáticamente"
156 | },
157 | "message":{
158 | "ready":"Listo",
159 | "timedout":"¡Se agotó el tiempo de acción! Comando abortado.",
160 | "couldNotSave":"¡No se pudo guardar en la ubicación seleccionada!",
161 | "updatingList":"Actualizando lista de adaptadores...",
162 | "selectAdapter":"Seleccione un adaptador y vuelva a intentarlo",
163 | "enterIP":"Ingrese una dirección IP",
164 | "enterSubnet":"Ingrese una máscara de subred",
165 | "settingIP":"Configurando dirección IP estática...",
166 | "settingDnsDhcp":"Configurando DNS DHCP...",
167 | "settingDnsPref":"Configurando el servidor DNS preferido...",
168 | "settingDnsAlt":"Configurando servidor DNS alternativo...",
169 | "errorOccurred":"Ocurrió un error",
170 | "profileNameExists":"¡El nombre del perfil ya existe!",
171 | "noProfileSel":"¡No se ha seleccionado ningún perfil!",
172 | "profilesNotFound":"No se encontró el archivo Profiles.ini - Se creará un nuevo archivo",
173 | "errorReadingProf":"Error al leer perfiles.ini",
174 | "adapterNotFound":"Adaptador no encontrado",
175 | "error":"Error",
176 | "advertencia":"Advertencia",
177 | "newItem":"Nuevo elemento",
178 | "applying":"Aplicando perfil",
179 | "errorRetrieving":"Hubo un problema al recuperar los adaptadores..",
180 | "commandTimeout":"Tiempo de espera agotado",
181 | "updateCheckError":"Se encontró un error al recuperar la actualización.",
182 | "checkConnect":"Por favor revise su conexion a internet.",
183 | "errorCode":"Error de codigo",
184 | "newVersion":"Una nueva versión está disponible",
185 | "currentVersion":"Tienes la ultima versión.",
186 | "yourVersion":"Tu versión es",
187 | "latestVersion":"La Ultima versión es",
188 | "loadedFile":"Archivo Cargado",
189 | "doneImporting":"Importación de perfil hecha!!!",
190 | "fileSaved":"Archivo Guardado"
191 | },
192 | "dialog":{
193 | "selectFile":"Seleccionar Archivo",
194 | "ini":"Archivo INI"
195 | }
196 | }
197 | }
--------------------------------------------------------------------------------
/lang/lang-fr-FR.json:
--------------------------------------------------------------------------------
1 | {
2 | "language-info":{
3 | "name":"Français",
4 | "code":"fr-FR"
5 | },
6 | "strings":{
7 | "buttonOK":"OK",
8 | "buttonCancel":"Annuler",
9 | "buttonSave":"Enregistrer",
10 | "menu":{
11 | "file":{
12 | "file":"&Fichier",
13 | "apply":"&Appliquer profil",
14 | "applyKey":"Entrer",
15 | "rename":"&Renommer",
16 | "renameKey":"F2",
17 | "new":"&Nouveau",
18 | "newKey":"Ctrl+n",
19 | "save":"&Enregistrer",
20 | "saveKey":"Ctrl+s",
21 | "delete":"&Supprimer",
22 | "deleteKey":"Del",
23 | "clear":"&Effacer les entrées",
24 | "clearKey":"Ctrl+c",
25 | "shortcut":"Créer un raccourci vers le profil",
26 | "open":"Ouvrir Fichier",
27 | "import":"Importer profils",
28 | "export":"Exporter profils",
29 | "exit":"&Quitter"
30 | },
31 | "view":{
32 | "view":"&Affichage",
33 | "refresh":"&Actualiser",
34 | "refreshKey":"Ctrl+r",
35 | "tray":"Envoyer vers &barre d'état système",
36 | "trayKey":"Ctrl+t",
37 | "hide":"Masquer les adaptateurs",
38 | "appearance":{
39 | "appearance":"Appearance",
40 | "light":"Light",
41 | "dark":"Dark"
42 | }
43 | },
44 | "tools":{
45 | "tools":"&Outils",
46 | "netConn":"Ouvrir les connexions réseau",
47 | "pull":"&Tirer de l'adaptateur",
48 | "pullKey":"Ctrl+p",
49 | "disable":"Désactiver l'adaptateur",
50 | "enable":"Activer l'adaptateur",
51 | "release":"&Libérer DHCP",
52 | "renew":"Re&nouveler DHCP",
53 | "cycle":"Libérer/renouveler &cycler",
54 | "openprofloc":"Accédez au dossier profiles.ini",
55 | "settings":"&Paramètres"
56 | },
57 | "help":{
58 | "help":"&Aide",
59 | "docs":"&Documentation en ligne",
60 | "docsKey":"F1",
61 | "changelog":"Afficher &Modifier le journal",
62 | "update":"Vérifier les &mises à jour...",
63 | "debug":"&Informations de débogage",
64 | "about":"&À propos de Simple IP Config"
65 | }
66 | },
67 | "traymenu":{
68 | "hide":"Masquer",
69 | "restore":"Restaurer",
70 | "about":"À propos de",
71 | "exit":"Quitter"
72 | },
73 | "lvmenu":{
74 | "rename":"Renommer",
75 | "delete":"Supprimer",
76 | "sortAsc":"Trier de A->Z",
77 | "sortDesc":"Trier de Z->A",
78 | "shortcut":"Créer un raccourci vers le profil"
79 | },
80 | "toolbar":{
81 | "apply":"Appliquer",
82 | "refresh":"Actualiser",
83 | "new":"Nouveau",
84 | "save":"Enregistrer",
85 | "delete":"Supprimer",
86 | "clear":"Effacer",
87 | "apply_tip":"Appliquer",
88 | "refresh_tip":"Actualiser",
89 | "new_tip":"Créer un nouveau profil",
90 | "save_tip":"Enregistrer le profil",
91 | "delete_tip":"Supprimer le profil",
92 | "clear_tip":"Effacer les entrées",
93 | "settings_tip":"Paramètres",
94 | "tray_tip":"Envoyer vers barre d'état système"
95 | },
96 | "interface":{
97 | "computername":"Nom de l'ordinateur",
98 | "domain":"Domaine",
99 | "workgroup":"Workgroup",
100 | "adapterDesc":"Description",
101 | "mac":"Adresse Mac",
102 | "select":"Sélectionnez l'adaptateur",
103 | "profiles":"Profils",
104 | "profileprops":"Propriétés IP du profil",
105 | "currentprops":"Propriétés actuelles de l'adaptateur",
106 | "restarting":"Redémarrage",
107 | "props":{
108 | "ip":"Adresse IP",
109 | "subnet":"Masque de sous-réseau",
110 | "gateway":"Passerelle",
111 | "dnsPref":"Serveur DNS préféré",
112 | "dnsAlt":"Serveur DNS alternatif",
113 | "dhcpServer":"Serveur DHCP",
114 | "adapterState":"État de l'adaptateur",
115 | "adapterStateEnabled":"Activé",
116 | "adapterStateDisabled":"Désactivé",
117 | "adapterStateUnplugged":"Débranché",
118 | "ipauto":"Définir l'adresse IP automatiquement",
119 | "ipmanual":"Définir l'adresse IP manuellement",
120 | "dnsauto":"Définir l'adresse DNS automatiquement",
121 | "dnsmanual":"Définir l'adresse DNS manuellement",
122 | "dnsreg":"Enregistrer les adresses",
123 | "memo":"Memo"
124 | }
125 | },
126 | "updates":{
127 | "title":"Vérifier les mises à jour",
128 | "thisVersion":"Cette version",
129 | "latestVersion":"Dernière version",
130 | "newMessage":"Une nouvelle version est disponible.",
131 | "latestMessage":"Vous avez la dernière version."
132 | },
133 | "about":{
134 | "title":"À propos de",
135 | "version":"Version",
136 | "date":"Date",
137 | "dev":"Développeur",
138 | "lic":"License",
139 | "desc":"Utilitaire de changeur d'IP portable qui offre à l'usager de changer rapidement et aisément les réglages réseau courants des connexions.",
140 | "icons":"Les icônes de programme proviennent de"
141 | },
142 | "changelog":{
143 | "changelog":"Journal des changements"
144 | },
145 | "blacklist":{
146 | "title":"Liste noire des adaptateurs",
147 | "heading":"Sélectionnez les adaptateurs à masquer"
148 | },
149 | "settings":{
150 | "title":"Paramètres",
151 | "lang":"Langage",
152 | "opt1":"Démarrage dans la barre d'état système",
153 | "opt2":"Réduire dans la barre d'état système",
154 | "opt3":"Enregistrer l'adaptateur dans le profil",
155 | "opt4":"Vérifier automatiquement les mises à jour"
156 | },
157 | "message":{
158 | "ready":"Prêt",
159 | "timedout":"Action expirée! Commande abandonnée.",
160 | "couldNotSave":"Impossible d'enregistrer à l'emplacement sélectionné!",
161 | "updatingList":"Mettre à jour la liste d'adaptateurs...",
162 | "selectAdapter":"Sélectionnez un adaptateur et réessayez",
163 | "enterIP":"Entrez une adresse IP",
164 | "enterSubnet":"Entrez un masque de sous-réseau",
165 | "settingIP":"Paramétrage d'une adresse IP statique...",
166 | "settingDnsDhcp":"Paramétrage DNS DHCP...",
167 | "settingDnsPref":"Paramétrage du serveur DNS préféré...",
168 | "settingDnsAlt":"Paramétrage d'un serveur DNS alternatif...",
169 | "errorOccurred":"une erreur est survenue",
170 | "profileNameExists":"Le nom du profil existe déjà!",
171 | "noProfileSel":"Aucun profil n'est sélectionné!",
172 | "profilesNotFound":"Fichier Profiles.ini introuvable - Un nouveau fichier sera créé",
173 | "errorReadingProf":"Erreur de lecture du fichier profiles.ini",
174 | "adapterNotFound":"Adaptateur introuvable",
175 | "error":"Erreur",
176 | "warning":"Avertissement",
177 | "newItem":"Nouvel élément",
178 | "applying":"Application du profil",
179 | "errorRetrieving":"Il y a eu un problème lors de la récupération des adaptateurs.",
180 | "commandTimeout":"Délai d'attente de la commande",
181 | "updateCheckError":"Une erreur s'est produite lors de la récupération de la mise à jour.",
182 | "checkConnect":"Veuillez vérifier votre connexion Internet.",
183 | "errorCode":"Code d'erreur",
184 | "newVersion":"Une nouvelle version est disponible",
185 | "currentVersion":"Vous avez la dernière version.",
186 | "yourVersion":"Votre version est",
187 | "latestVersion":"La dernière version est",
188 | "loadedFile":"Fichier chargé",
189 | "doneImporting":"Importation des profils terminée",
190 | "fileSaved":"Fichier enregistré"
191 | },
192 | "dialog":{
193 | "selectFile":"Sélectionnez Fichier",
194 | "ini":"Fichiers INI"
195 | }
196 | }
197 | }
--------------------------------------------------------------------------------
/lang/lang-it-IT.json:
--------------------------------------------------------------------------------
1 | {
2 | "language-info":{
3 | "name":"Italiano",
4 | "code":"it-IT"
5 | },
6 | "strings":{
7 | "buttonOK":"OK",
8 | "buttonCancel":"Annulla",
9 | "buttonSave":"Salva",
10 | "menu":{
11 | "file":{
12 | "file":"&File",
13 | "apply":"&Applica profilo",
14 | "applyKey":"Invio",
15 | "rename":"&Rinomina",
16 | "renameKey":"F2",
17 | "new":"&Nuovo",
18 | "newKey":"Ctrl+n",
19 | "save":"&Salva",
20 | "saveKey":"Ctrl+s",
21 | "delete":"&Elimina",
22 | "deleteKey":"Canc",
23 | "clear":"A&zzera voci",
24 | "clearKey":"Ctrl+c",
25 | "shortcut":"Crea colle&gamento al profilo",
26 | "open":"Apri file",
27 | "import":"Importa profili",
28 | "export":"Esporta profili",
29 | "exit":"&Esci"
30 | },
31 | "view":{
32 | "view":"&Visualizza",
33 | "refresh":"&Aggiorna",
34 | "refreshKey":"Ctrl+r",
35 | "tray":"Riduci nella barra di sis&tema",
36 | "trayKey":"Ctrl+t",
37 | "hide":"Nascondi schede di rete",
38 | "appearance":{
39 | "appearance":"Tema",
40 | "light":"Chiaro",
41 | "dark":"Scuro"
42 | }
43 | },
44 | "tools":{
45 | "tools":"&Strumenti",
46 | "netConn":"Apri Connessioni di rete",
47 | "pull":"&Ottieni impostazioni dalla scheda di rete",
48 | "pullKey":"Ctrl+p",
49 | "disable":"Disabilita scheda di rete",
50 | "enable":"Abilita scheda di rete",
51 | "release":"&Rilascia DHCP",
52 | "renew":"Ri&nnova DHCP",
53 | "cycle":"&Ciclo rilascio/rinnovo DHCP",
54 | "openprofloc":"Vai alla cartella del file 'profiles.ini'",
55 | "settings":"&Impostazioni"
56 | },
57 | "help":{
58 | "help":"&?",
59 | "docs":"Documentazione &online",
60 | "docsKey":"F1",
61 | "changelog":"Visualizza &novità programma",
62 | "update":"Controlla &aggiornamenti programma...",
63 | "debug":"Informazioni &debug",
64 | "about":"&Informazioni su Simple IP Config"
65 | }
66 | },
67 | "traymenu":{
68 | "hide":"Nascondi",
69 | "restore":"Ripristina",
70 | "about":"Info programma",
71 | "exit":"Esci"
72 | },
73 | "lvmenu":{
74 | "rename":"Rinomina",
75 | "delete":"Elimina",
76 | "sortAsc":"Ordina A->Z",
77 | "sortDesc":"Ordina Z->A",
78 | "shortcut":"Crea collegamento al profilo"
79 | },
80 | "toolbar":{
81 | "apply":"Applica",
82 | "refresh":"Aggiorna",
83 | "new":"Nuovo",
84 | "save":"Salva",
85 | "delete":"Elimina",
86 | "clear":"Azzera",
87 | "apply_tip":"Applica",
88 | "refresh_tip":"Aggiorna",
89 | "new_tip":"Crea nuovo profilo",
90 | "save_tip":"Salva profilo",
91 | "delete_tip":"Elimina profilo",
92 | "clear_tip":"Azzera voci",
93 | "settings_tip":"Impostazioni",
94 | "tray_tip":"Minimizza nella barra di sistema"
95 | },
96 | "interface":{
97 | "computername":"Nome computer",
98 | "domain":"Dominio",
99 | "workgroup":"Gruppo di lavoro",
100 | "adapterDesc":"Descrizione",
101 | "mac":"Indirizzo MAC",
102 | "select":"Seleziona scheda di rete",
103 | "profiles":"Profili",
104 | "profileprops":"Proprietà IP profilo",
105 | "currentprops":"Proprietà scheda di rete attuale",
106 | "restarting":"Riavvio",
107 | "props":{
108 | "ip":"Indirizzo IP",
109 | "subnet":"Maschera sotto rete",
110 | "gateway":"Gateway",
111 | "dnsPref":"Server DNS primario",
112 | "dnsAlt":"Server DNS secondario",
113 | "dhcpServer":"Server DHCP",
114 | "adapterState":"Stato scheda di rete",
115 | "adapterStateEnabled":"Abilitata",
116 | "adapterStateDisabled":"Disabilitata",
117 | "adapterStateUnplugged":"Non collegata",
118 | "ipauto":"Imposta automaticamente indirizzo IP",
119 | "ipmanual":"Imposta manualmente indirizzo IP",
120 | "dnsauto":"Imposta automaticamente indirizzo IP server DNS",
121 | "dnsmanual":"Imposta manualmente indirizzo IP server DNS",
122 | "dnsreg":"Registra indirizzi",
123 | "memo":"Memo"
124 | }
125 | },
126 | "updates":{
127 | "title":"Controlla aggiornamenti",
128 | "thisVersion":"Versione installata",
129 | "latestVersion":"Versione aggiornata",
130 | "newMessage":"È disponibile una nuova versione.",
131 | "latestMessage":"La versione installata è aggiornata."
132 | },
133 | "about":{
134 | "title":"Informazioni programma",
135 | "version":"Versione",
136 | "date":"Data",
137 | "dev":"Sviluppatore",
138 | "lic":"Licenza",
139 | "desc":"Programma che permette di modificare rapidamente e facilmente le impostazioni di rete più comuni per qualsiasi connessione.",
140 | "icons":"Autore icone programma"
141 | },
142 | "changelog":{
143 | "changelog":"Novità programma"
144 | },
145 | "blacklist":{
146 | "title":"Elenco schede di rete nascoste",
147 | "heading":"Seleziona scheda di rete da nascondere"
148 | },
149 | "settings":{
150 | "title":"Impostazioni",
151 | "lang":"Lingua",
152 | "opt1":"Avvia minimizzato nella barra di sistema",
153 | "opt2":"Minimizza nella barra di sistema",
154 | "opt3":"Salva scheda di rete nel profilo",
155 | "opt4":"Controlla automaticamente aggiornamenti"
156 | },
157 | "message":{
158 | "ready":"Pronto",
159 | "timedout":"Azione scaduta! Comando interrotto.",
160 | "couldNotSave":"Impossibile salvare il file nel percorso selezionato!",
161 | "updatingList":"Aggiornamento elenco schede di rete...",
162 | "selectAdapter":"Seleziona una scheda di rete e riprova",
163 | "enterIP":"Inserisci un indirizzo IP",
164 | "enterSubnet":"Inserisci una maschera di sotto rete",
165 | "settingIP":"Impostazione indirizzo IP statico...",
166 | "settingDnsDhcp":"Impostazione DNS DHCP...",
167 | "settingDnsPref":"Impostazione indirizzo IP server DNS primario...",
168 | "settingDnsAlt":"Impostazione indirizzo IP DNS secondario...",
169 | "errorOccurred":"Si è verificato un errore",
170 | "profileNameExists":"Questo nome profilo esiste già!",
171 | "noProfileSel":"Nessun profilo selezionato!",
172 | "profilesNotFound":"File 'profiles.ini' non trovato - Verrà creato un nuovo file profilo.",
173 | "errorReadingProf":"Errore durante la lettura del file 'profiles.ini'",
174 | "adapterNotFound":"Scheda di rete non trovata",
175 | "error":"Errore",
176 | "warning":"Avviso",
177 | "newItem":"Nuovo profilo",
178 | "applying":"Applicazione profilo",
179 | "errorRetrieving":"Si è verificato un problema durante il recupero delle informazioni sulle schede di rete.",
180 | "commandTimeout":"Timeout comando",
181 | "updateCheckError":"Si è verificato un errore durante il download dell'aggiornamento.",
182 | "checkConnect":"Controlla la connessione Internet.",
183 | "errorCode":"Codice errore",
184 | "newVersion":"È disponibile una nuova versione del programma",
185 | "currentVersion":"La versione installata è aggiornata.",
186 | "yourVersion":"Versione installata",
187 | "latestVersion":"Versione aggiornata",
188 | "loadedFile":"Caricamento file completato",
189 | "doneImporting":"Importazione profili completata",
190 | "fileSaved":"Salvataggio file completato"
191 | },
192 | "dialog":{
193 | "selectFile":"Seleziona file",
194 | "ini":"File INI"
195 | }
196 | }
197 | }
198 |
--------------------------------------------------------------------------------
/lang/lang-nl-NL.json:
--------------------------------------------------------------------------------
1 | {
2 | "language-info":{
3 | "name":"Nederlands",
4 | "code":"nl-NL"
5 | },
6 | "strings":{
7 | "buttonOK":"OK",
8 | "buttonCancel":"Annuleren",
9 | "buttonSave":"Opslaan",
10 | "menu":{
11 | "file":{
12 | "file":"&Bestand",
13 | "apply":"&Profiel toepassen",
14 | "applyKey":"Enter",
15 | "rename":"&Hernoemen",
16 | "renameKey":"F2",
17 | "new":"&Nieuw",
18 | "newKey":"Ctrl+n",
19 | "save":"&Opslaan",
20 | "saveKey":"Ctrl+s",
21 | "delete":"&Verwijderen",
22 | "deleteKey":"Del",
23 | "clear":"&Waardes leegmaken",
24 | "clearKey":"Ctrl+c",
25 | "shortcut":"Maak profiel snelkoppeling",
26 | "open":"Open Bestand",
27 | "import":"Profielen importeren",
28 | "export":"Profielen exporteren",
29 | "exit":"&Afsluiten"
30 | },
31 | "view":{
32 | "view":"&Weergave",
33 | "refresh":"&Verversen",
34 | "refreshKey":"Ctrl+r",
35 | "tray":"Naar &taakbalk minimaliseren",
36 | "trayKey":"Ctrl+t",
37 | "hide":"Adapters verbergen",
38 | "appearance":{
39 | "appearance":"Appearance",
40 | "light":"Light",
41 | "dark":"Dark"
42 | }
43 | },
44 | "tools":{
45 | "tools":"&Gereedschappen",
46 | "netConn":"Open netwerkverbindingen",
47 | "pull":"&Haal adapterinformatie op",
48 | "pullKey":"Ctrl+p",
49 | "disable":"Adapter uitschakelen",
50 | "enable":"Adapter inschakelen",
51 | "release":"&DHCP lease vrijgeven",
52 | "renew":"DHCP lease &vernieuwen",
53 | "cycle":"Vrijgeven/vernieuwen &cyclus",
54 | "openprofloc":"Ga naar profiles.ini folder",
55 | "settings":"&Instellingen"
56 | },
57 | "help":{
58 | "help":"&Help",
59 | "docs":"&Online Documentatie",
60 | "docsKey":"F1",
61 | "changelog":"Toon &Change Log",
62 | "update":"Check voor &Updates...",
63 | "debug":"&Debug Informatie",
64 | "about":"&Over Simple IP Config"
65 | }
66 | },
67 | "traymenu":{
68 | "hide":"Verbergen",
69 | "restore":"Herstellen",
70 | "about":"Over",
71 | "exit":"Afsluiten"
72 | },
73 | "lvmenu":{
74 | "rename":"Hernoemen",
75 | "delete":"Verwijderen",
76 | "sortAsc":"Sorteren A->Z",
77 | "sortDesc":"Sorteren Z->A",
78 | "shortcut":"Maak snelkoppeling naar profielen"
79 | },
80 | "toolbar":{
81 | "apply":"Toepassen",
82 | "refresh":"Vernieuwen",
83 | "new":"Nieuw",
84 | "save":"Opslaan",
85 | "delete":"Verwijderen",
86 | "clear":"Schonen",
87 | "apply_tip":"Toepassen",
88 | "refresh_tip":"Vernieuwen",
89 | "new_tip":"Maak nieuw profiel",
90 | "save_tip":"Profiel opslaan",
91 | "delete_tip":"Profiel verwijderen",
92 | "clear_tip":"Waardes leegmaken",
93 | "settings_tip":"Instellingen",
94 | "tray_tip":"Naar taakbalk"
95 | },
96 | "interface":{
97 | "computername":"Computer naam",
98 | "domain":"Domein",
99 | "workgroup":"Workgroup",
100 | "adapterDesc":"Beschrijving",
101 | "mac":"MAC Adres",
102 | "select":"Selecteer Adapter",
103 | "profiles":"Profielen",
104 | "profileprops":"Profiel IP eigenschappen",
105 | "currentprops":"Huidige Adapter eigenschappen",
106 | "restarting":"Opnieuw aan het starten",
107 | "props":{
108 | "ip":"IP Adres",
109 | "subnet":"Subnetmasker",
110 | "gateway":"Gateway",
111 | "dnsPref":"Voorkeur DNS Server",
112 | "dnsAlt":"Alternatieve DNS Server",
113 | "dhcpServer":"DHCP Server",
114 | "adapterState":"Adapter Status",
115 | "adapterStateEnabled":"Ingeschakeld",
116 | "adapterStateDisabled":"Uitgeschakeld",
117 | "adapterStateUnplugged":"Niet aangesloten",
118 | "ipauto":"Automatisch IP Adres verkrijgen",
119 | "ipmanual":"Handmatig IP Adres toekennen",
120 | "dnsauto":"Automatisch DNS Adres verkrijgen",
121 | "dnsmanual":"Handmatig DNS Adres toekennen",
122 | "dnsreg":"Registeer Adressen",
123 | "memo":"Memo"
124 | }
125 | },
126 | "updates":{
127 | "title":"Controleer op updates",
128 | "thisVersion":"Deze versie",
129 | "latestVersion":"Laatste versie",
130 | "newMessage":"Een nieuwe versie is beschikbaar.",
131 | "latestMessage":"Je hebt de laatste versie."
132 | },
133 | "about":{
134 | "title":"Over",
135 | "version":"Versie",
136 | "date":"Datum",
137 | "dev":"Ontwikkelaar",
138 | "lic":"Licentie",
139 | "desc":"Het draagbare ip-wissel hulpprogramma waarmee een gebruiker snel en gemakkelijk de meest voorkomende netwerkinstellingen voor elke verbinding kan wijzigen.",
140 | "icons":"Programma iconen zijn van"
141 | },
142 | "changelog":{
143 | "changelog":"Change Log"
144 | },
145 | "blacklist":{
146 | "title":"Zwartelijst adapters",
147 | "heading":"Selecteer Adapters om te verbergen"
148 | },
149 | "settings":{
150 | "title":"Instellingen",
151 | "lang":"Taal",
152 | "opt1":"Opstarten in systeemvak",
153 | "opt2":"Sluiten naar het systeemvak",
154 | "opt3":"Sla adapter op in profiel",
155 | "opt4":"Automatisch controleren op updates"
156 | },
157 | "message":{
158 | "ready":"Klaar",
159 | "timedout":"Actie timed out! Commando afgebroken.",
160 | "couldNotSave":"Kan niet opslaan op opgegeven locatie!",
161 | "updatingList":"Bijwerken Adapter lijst...",
162 | "selectAdapter":"Selecteer een adapter en probeer opnieuw",
163 | "enterIP":"Geef een IP adres op",
164 | "enterSubnet":"Geef een subnetmasker op",
165 | "settingIP":"Vast IP adres toepassen...",
166 | "settingDnsDhcp":"DNS DHCP toepassen...",
167 | "settingDnsPref":"Voorkeur DNS server toepassen...",
168 | "settingDnsAlt":"Alternatieve DNS server toepassen...",
169 | "errorOccurred":"Er is een fout opgetreden",
170 | "profileNameExists":"De profielnaam bestaat al!",
171 | "noProfileSel":"Er is geen profiel geselecteerd!",
172 | "profilesNotFound":"Profiles.ini bestand niet gevonden - Een nieuw bestand wordt aangemaakt",
173 | "errorReadingProf":"Kan profiles.ini niet lezen",
174 | "adapterNotFound":"Adapter niet gevonden",
175 | "error":"Fout",
176 | "warning":"Waarschuwing",
177 | "newItem":"Nieuw Item",
178 | "applying":"Profiel wordt toegepast",
179 | "errorRetrieving":"Er was een probleem met het ophalen van de adpaterlijst.",
180 | "commandTimeout":"Commando timed-out",
181 | "updateCheckError":"Er is een fout opgetreden met het binnenhalen van de update.",
182 | "checkConnect":"Controleer de internetverbindig.",
183 | "errorCode":"Fout code",
184 | "newVersion":"Er is een nieuwe versie beschikbaar",
185 | "currentVersion":"Je hebt de laatste versie.",
186 | "yourVersion":"Deze versie is",
187 | "latestVersion":"De laaste versie is",
188 | "loadedFile":"Geladen bestand",
189 | "doneImporting":"Klaar met importeren profielen",
190 | "fileSaved":"Bestand opgeslagen"
191 | },
192 | "dialog":{
193 | "selectFile":"Selecter bestand",
194 | "ini":"INI Files"
195 | }
196 | }
197 | }
198 |
--------------------------------------------------------------------------------
/lang/lang-ro-RO.json:
--------------------------------------------------------------------------------
1 | {
2 | "language-info":{
3 | "name":"Română",
4 | "code":"ro-RO"
5 | },
6 | "strings":{
7 | "buttonOK":"Închide",
8 | "buttonCancel":"Anulază",
9 | "buttonSave":"Salvează",
10 | "menu":{
11 | "file":{
12 | "file":"&Fișier",
13 | "apply":"&Aplică profilul",
14 | "applyKey":"Enter",
15 | "rename":"&Redenumește",
16 | "renameKey":"F2",
17 | "new":"&Nou",
18 | "newKey":"Ctrl+n",
19 | "save":"&Salvează",
20 | "saveKey":"Ctrl+s",
21 | "delete":"Ș&terge",
22 | "deleteKey":"Del",
23 | "clear":"Șt&erge înregistrarea",
24 | "clearKey":"Ctrl+c",
25 | "shortcut":"&Crează scurtătură profil",
26 | "open":"&Deschide fișier",
27 | "import":"I&mportă profil",
28 | "export":"Ex&portă profil",
29 | "exit":"Înc&hide aplicația"
30 | },
31 | "view":{
32 | "view":"&Vizualizare",
33 | "refresh":"&Reîmprospătare",
34 | "refreshKey":"Ctrl+r",
35 | "tray":"Trimite în &tavă",
36 | "tavăKey":"Ctrl+t",
37 | "hide":"&Ascunde adaptori",
38 | "appearance":{
39 | "appearance":"Appearance",
40 | "light":"Light",
41 | "dark":"Dark"
42 | }
43 | },
44 | "tools":{
45 | "tools":"&Unelte",
46 | "netConn":"&Deschide conexiuni de rețea",
47 | "pull":"Încarcă de pe ada&ptor",
48 | "pullKey":"Ctrl+p",
49 | "disable":"De&zactivează adaptorul",
50 | "enable":"&Activare adaptor",
51 | "release":"&Eliberează DHCP",
52 | "renew":"&Reîmprospătează DHCP",
53 | "cycle":"&Ciclu eliberare/reînnoire",
54 | "openprofloc":"Mergi la &fișierul profiles.ini",
55 | "settings":"&Setări"
56 | },
57 | "help":{
58 | "help":"&Ajutor",
59 | "docs":"&Documentație Online",
60 | "docsKey":"F1",
61 | "changelog":"Afișează &schimbările",
62 | "update":"&Verifică actualizări...",
63 | "debug":"&Informații depanare",
64 | "about":"D&espre Simple IP Config"
65 | }
66 | },
67 | "traymenu":{
68 | "hide":"Ascunde",
69 | "restore":"Restabilește",
70 | "about":"Despre",
71 | "exit":"Închide aplicația"
72 | },
73 | "lvmenu":{
74 | "rename":"Redenumește",
75 | "delete":"Șterge",
76 | "sortAsc":"Sortează A->Z",
77 | "sortDesc":"Sortează Z->A",
78 | "shortcut":"Crează scurtătură pentru profil"
79 | },
80 | "toolbar":{
81 | "apply":"Aplică",
82 | "refresh":"Reîmprospătare",
83 | "new":"Nou",
84 | "save":"Salvează",
85 | "delete":"Șterge",
86 | "clear":"Curată",
87 | "apply_tip":"Aplică",
88 | "refresh_tip":"Reîmprospătare",
89 | "new_tip":"Crează profil nou",
90 | "save_tip":"Salvează profilul",
91 | "delete_tip":"Șterge profilul",
92 | "clear_tip":"Curată intrare",
93 | "settings_tip":"Setări",
94 | "tavă_tip":"Trimite în tavă"
95 | },
96 | "interface":{
97 | "computername":"Nume calculator",
98 | "domain":"Domeniu",
99 | "workgroup":"Grup de lucru",
100 | "adapterDesc":"Descriere",
101 | "mac":"Adresă MAC",
102 | "select":"Selectează adaptor",
103 | "profiles":"Profile",
104 | "profileprops":"Proprietăți profil IP",
105 | "currentprops":"Proprietăți adaptor curent",
106 | "restarting":"Repornire",
107 | "props":{
108 | "ip":"Adresă IP",
109 | "subnet":"Mască subrețea",
110 | "gateway":"Poartă",
111 | "dnsPref":"Server DNS preferat",
112 | "dnsAlt":"Server DNS alternativ",
113 | "dhcpServer":"Server DHCP",
114 | "adapterState":"Stare adaptor",
115 | "adapterStateEnabled":"Activat",
116 | "adapterStateDisabled":"Dezactivat",
117 | "adapterStateUnplugged":"Deconectat",
118 | "ipauto":"Setează adresă IP automat",
119 | "ipmanual":"Setează adresă IP manual ",
120 | "dnsauto":"Setează adresă DNS automat",
121 | "dnsmanual":"Setează adresă DNS manual",
122 | "dnsreg":"Înregistrează adresa",
123 | "memo":"Memo"
124 | }
125 | },
126 | "updates":{
127 | "title":"Verifică actualizări",
128 | "thisVersion":"Această versiune",
129 | "latestVersion":"Ultima versiune",
130 | "newMessage":"O nouă versiune este disponibilă.",
131 | "latestMessage":"Ai deja ultima versiune."
132 | },
133 | "about":{
134 | "title":"Despre",
135 | "version":"Versiune",
136 | "date":"Data",
137 | "dev":"Dezvoltator",
138 | "lic":"Licență",
139 | "_comment":"Traducere în limba Română: Mihai ȘERBAN",
140 | "desc":"Utilitar portabil pentru schimbarea de adrese IP, care permite unui utilizator să schimbe rapid și ușor cele mai comune setări de rețea.",
141 | "icons":"Icon-urile programului sunt de la"
142 | },
143 | "changelog":{
144 | "changelog":"Listă schimbări"
145 | },
146 | "blacklist":{
147 | "title":"Listă neagră adaptori",
148 | "heading":"Selectează adaptor pentru ascundere"
149 | },
150 | "settings":{
151 | "title":"Setări",
152 | "lang":"Limba",
153 | "opt1":"Pornește în tavă",
154 | "opt2":"Minimizează în tavă",
155 | "opt3":"Salvează adaptorul în profil",
156 | "opt4":"Verificare automată actualizări"
157 | },
158 | "message":{
159 | "ready":"Pregătit",
160 | "timedout":"Acțiunea a expirat! Comandă anulată.",
161 | "couldNotSave":"Nu s-a putut salva în locația selectată!",
162 | "updatingList":"Se actualizează lista de adaptoare...",
163 | "selectAdapter":"Selectați un adaptor și încercați din nou",
164 | "enterIP":"Introduceți o adresă IP",
165 | "enterSubnet":"Introduceți o mască de subrețea",
166 | "settingIP":"Se setează adresa IP statică...",
167 | "settingDnsDhcp":"Se setează DNS DHCP...",
168 | "settingDnsPref":"Se setează serverul DNS preferat...",
169 | "settingDnsAlt":"Se setează serverul DNS alternativ...",
170 | "errorOccurred":"A aparut o eroare",
171 | "profileNameExists":"Numele profilului există deja!",
172 | "noProfileSel":"Niciun profil nu este selectat!",
173 | "profilesNotFound":"Fișierul Profiles.ini nu a fost găsit - va fi creat un fișier nou",
174 | "errorReadingProf":"Eroare la citirea profiles.ini",
175 | "adapterNotFound":"Adaptorul nu a fost găsit",
176 | "error":"Eroare",
177 | "warning":"Avertizare",
178 | "newItem":"Articol nou",
179 | "applying":"Aplicarea profilului",
180 | "errorRetrieving":"A apărut o problemă la preluarea adaptoarelor.",
181 | "commandTimeout":"Comandă expirată",
182 | "updateCheckError":"A apărut o eroare la preluarea actualizării.",
183 | "checkConnect":"Te rog să verifici conexiunea la internet.",
184 | "errorCode":"Cod de eroare",
185 | "newVersion":"Este disponibilă o versiune mai nouă",
186 | "currentVersion":"Ai cea mai recentă versiune.",
187 | "yourVersion":"Versiunea ta este",
188 | "latestVersion":"Ultima versiune este",
189 | "loadedFile":"Fișier încărcat",
190 | "doneImporting":"S-a terminat de importat profilurile",
191 | "fileSaved":"Fișier salvat"
192 | },
193 | "dialog":{
194 | "selectFile":"Selectați fișier",
195 | "ini":"Fisier INI"
196 | }
197 | }
198 | }
--------------------------------------------------------------------------------
/lang/lang-ru-RU.json:
--------------------------------------------------------------------------------
1 | {
2 | "language-info":{
3 | "name":"Русский",
4 | "code":"ru-RU"
5 | },
6 | "strings":{
7 | "buttonOK":"Ок",
8 | "buttonCancel":"Отмена",
9 | "buttonSave":"Сохранить",
10 | "menu":{
11 | "file":{
12 | "file":"&Файл",
13 | "apply":"&Применить профиль",
14 | "applyKey":"Enter",
15 | "rename":"&Переименовать",
16 | "renameKey":"F2",
17 | "new":"&Новый",
18 | "newKey":"Ctrl+n",
19 | "save":"&Сохранть",
20 | "saveKey":"Ctrl+s",
21 | "delete":"&Удалить",
22 | "deleteKey":"Del",
23 | "clear":"&Очистить записи",
24 | "clearKey":"Ctrl+c",
25 | "shortcut":"Создать &ярлык на профиль",
26 | "open":"Открыть файл",
27 | "import":"Импорт профилей",
28 | "export":"Экспорт профилей",
29 | "exit":"&Выход"
30 | },
31 | "view":{
32 | "view":"&Вид",
33 | "refresh":"&Обновить",
34 | "refreshKey":"Ctrl+r",
35 | "tray":"Отправить в &трей",
36 | "trayKey":"Ctrl+t",
37 | "hide":"Скрыть адаптеры",
38 | "appearance":{
39 | "appearance":"Appearance",
40 | "light":"Light",
41 | "dark":"Dark"
42 | }
43 | },
44 | "tools":{
45 | "tools":"&Инструменты",
46 | "netConn":"Открытые сетевые подключения",
47 | "pull":"&Снять с адаптера",
48 | "pullKey":"Ctrl+p",
49 | "disable":"Отключить адаптер",
50 | "enable":"Включить адаптер",
51 | "release":"&Освободить DHCP",
52 | "renew":"&Обновить DHCP",
53 | "cycle":"&Выпустить/обновить цикл",
54 | "openprofloc":"Перейдите в папку profiles.ini",
55 | "settings":"&Настройки"
56 | },
57 | "help":{
58 | "help":"&Помощь",
59 | "docs":"&Онлайн-документация",
60 | "docsKey":"F1",
61 | "changelog":"&Показать журнал изменений",
62 | "update":"&Проверить наличие обновлений...",
63 | "debug":"&Отладочная информация",
64 | "about":"&О программе"
65 | }
66 | },
67 | "traymenu":{
68 | "hide":"Скрыть",
69 | "restore":"Восстановить",
70 | "about":"О программе",
71 | "exit":"Выход"
72 | },
73 | "lvmenu":{
74 | "rename":"Переименовать",
75 | "delete":"Удалить",
76 | "sortAsc":"Сортировать А->Я",
77 | "sortDesc":"Сортировать Я->А",
78 | "shortcut":"Создать ярлык на профиль"
79 | },
80 | "toolbar":{
81 | "apply":"Применить",
82 | "refresh":"Обновить",
83 | "new":"Новый",
84 | "save":"Сохранить",
85 | "delete":"Удалить",
86 | "clear":"Очистить",
87 | "apply_tip":"Применить",
88 | "refresh_tip":"Обновить",
89 | "new_tip":"Создать новый профиль",
90 | "save_tip":"Сохранить профиль",
91 | "delete_tip":"Удалить профиль",
92 | "clear_tip":"Очистить записи",
93 | "settings_tip":"Настройки",
94 | "tray_tip":"Отправить в трей"
95 | },
96 | "interface":{
97 | "computername":"Имя компьютера",
98 | "domain":"Домен",
99 | "workgroup":"Рабочая группа",
100 | "adapterDesc":"Описание",
101 | "mac":"MAC-адрес",
102 | "select":"Выбрать адаптер",
103 | "profiles":"Профили",
104 | "profileprops":"Свойства IP-адреса профиля",
105 | "currentprops":"Свойства текущего адаптера",
106 | "restarting":"перезапуск",
107 | "props":{
108 | "ip":"IP-адрес",
109 | "subnet":"Маска сети",
110 | "gateway":"Шлюз",
111 | "dnsPref":"Предпочтительный DNS-сервер",
112 | "dnsAlt":"Альтернативный DNS-сервер",
113 | "dhcpServer":"DHCP-сервер",
114 | "adapterState":"Состояние адаптера",
115 | "adapterStateEnabled":"Включено",
116 | "adapterStateDisabled":"Отключено",
117 | "adapterStateUnplugged":"otklyuchen",
118 | "ipauto":"Автоматическая установка IP-адреса",
119 | "ipmanual":"Ручная установка IP-адрес",
120 | "dnsauto":"Автоматическая установка DNS-адресов",
121 | "dnsmanual":"Ручная установка DNS-адресов",
122 | "dnsreg":"Регистрация адресов",
123 | "memo":"Memo"
124 | }
125 | },
126 | "updates":{
127 | "title":"Проверить наличие обновлений",
128 | "thisVersion":"Данная версия",
129 | "latestVersion":"Последняя версия",
130 | "newMessage":"Доступна более новая версия.",
131 | "latestMessage":"У вас последняя версия."
132 | },
133 | "about":{
134 | "title":"О программе",
135 | "version":"Версия",
136 | "date":"Дата",
137 | "dev":"Разработчик",
138 | "lic":"Лицензия",
139 | "desc":"Портативная утилита смены IP-адресов, которая позволяет пользователю быстро и легко изменять наиболее распространенные сетевые настройки для любого соединения.",
140 | "icons":"Иконки программы взяты из"
141 | },
142 | "changelog":{
143 | "changelog":"Журнал изменений"
144 | },
145 | "blacklist":{
146 | "title":"Черный список адаптеров",
147 | "heading":"Выберите адаптеры для скрытия"
148 | },
149 | "settings":{
150 | "title":"Настройки",
151 | "lang":"Язык",
152 | "opt1":"Запуск в системном трее",
153 | "opt2":"Свернуть в системный трей",
154 | "opt3":"Сохранить адаптер в профиль",
155 | "opt4":"Автоматически проверять наличие обновлений"
156 | },
157 | "message":{
158 | "ready":"Готов",
159 | "timedout":"Время вышло! Команда прервана.",
160 | "couldNotSave":"Не удалось сохранить в выбранное место!",
161 | "updatingList":"Обновление списка адаптеров...",
162 | "selectAdapter":"Выберите адаптер и повторите попытку.",
163 | "enterIP":"Введите IP-адрес",
164 | "enterSubnet":"Введите маску сети",
165 | "settingIP":"Установка статического IP-адреса...",
166 | "settingDnsDhcp":"Настройка DNS-DHCP...",
167 | "settingDnsPref":"Настройка предпочтительного DNS-сервера...",
168 | "settingDnsAlt":"Настройка альтернативного DNS-сервера...",
169 | "errorOccurred":"Произошла ошибка",
170 | "profileNameExists":"Имя профиля уже существует!",
171 | "noProfileSel":"Профиль не выбран!",
172 | "profilesNotFound":"Profiles.ini файл не найден - будет создан новый файл",
173 | "errorReadingProf":"Ошибка чтения profiles.ini",
174 | "adapterNotFound":"Адаптер не найден",
175 | "error":"Ошибка",
176 | "warning":"Предупреждение",
177 | "newItem":"Новый элемент",
178 | "applying":"Применение профиля",
179 | "errorRetrieving":"Не удалось получить адаптеры.",
180 | "commandTimeout":"Время ожидания команды",
181 | "updateCheckError":"При получении обновления произошла ошибка.",
182 | "checkConnect":"Пожалуйста, проверьте ваше интернет-соединение.",
183 | "errorCode":"Код ошибки",
184 | "newVersion":"Доступна более новая версия",
185 | "currentVersion":"У вас последняя версия.",
186 | "yourVersion":"Ваша версия",
187 | "latestVersion":"Последняя версия",
188 | "loadedFile":"Loaded file",
189 | "doneImporting":"Done importing profiles",
190 | "fileSaved":"File saved"
191 | },
192 | "dialog":{
193 | "selectFile":"Выбрать файл",
194 | "ini":"INI-файлы"
195 | }
196 | }
197 | }
--------------------------------------------------------------------------------
/lang/lang-zh-CN.json:
--------------------------------------------------------------------------------
1 | {
2 | "language-info":{
3 | "name":"Simple Chinese",
4 | "code":"zh-CN"
5 | },
6 | "strings":{
7 | "buttonOK":"确认",
8 | "buttonCancel":"取消",
9 | "buttonSave":"保存",
10 | "menu":{
11 | "file":{
12 | "file":"&文件",
13 | "apply":"&应用设置",
14 | "applyKey":"Enter",
15 | "rename":"&重命名",
16 | "renameKey":"F2",
17 | "new":"&新建",
18 | "newKey":"Ctrl+n",
19 | "save":"&保存",
20 | "saveKey":"Ctrl+s",
21 | "delete":"&删除",
22 | "deleteKey":"Del",
23 | "clear":"&清除条目",
24 | "clearKey":"Ctrl+c",
25 | "shortcut":"创建配置文件的快捷方式",
26 | "open":"打开文件",
27 | "import":"导入配置文件",
28 | "export":"导出配置文件",
29 | "exit":"&退出"
30 | },
31 | "view":{
32 | "view":"&查看",
33 | "refresh":"&刷新",
34 | "refreshKey":"Ctrl+r",
35 | "tray":"缩小到任务栏",
36 | "trayKey":"Ctrl+t",
37 | "hide":"隐藏网络适配器",
38 | "appearance":{
39 | "appearance":"外观",
40 | "light":"浅色",
41 | "dark":"深色"
42 | }
43 | },
44 | "tools":{
45 | "tools":"&工具",
46 | "netConn":"新建网络连接",
47 | "pull":"&同步网络适配器设置",
48 | "pullKey":"Ctrl+p",
49 | "disable":"禁用网络适配器",
50 | "enable":"启用网络适配器",
51 | "release":"&释放 DHCP",
52 | "renew":"&重新获取 DHCP",
53 | "cycle":"先释放然后重新获取 DHCP",
54 | "openprofloc":"转到profiles.ini 文件夹",
55 | "settings":"&设置"
56 | },
57 | "help":{
58 | "help":"&帮助",
59 | "docs":"&在线文档",
60 | "docsKey":"F1",
61 | "changelog":"&更新日志",
62 | "update":"&检查更新",
63 | "debug":"&Debug 信息",
64 | "about":"&关于 Simple IP Config"
65 | }
66 | },
67 | "traymenu":{
68 | "hide":"隐藏",
69 | "restore":"恢复",
70 | "about":"关于",
71 | "exit":"退出"
72 | },
73 | "lvmenu":{
74 | "rename":"重命名",
75 | "delete":"删除",
76 | "sortAsc":"按A->Z排序",
77 | "sortDesc":"按Z->A排序",
78 | "shortcut":"创建配置文件的快捷方式"
79 | },
80 | "toolbar":{
81 | "apply":"应用",
82 | "refresh":"刷新",
83 | "new":"新建",
84 | "save":"保存",
85 | "delete":"删除",
86 | "clear":"清空",
87 | "apply_tip":"应用",
88 | "refresh_tip":"刷新",
89 | "new_tip":"创建新的配置文件",
90 | "save_tip":"保存配置文件",
91 | "delete_tip":"删除配置文件",
92 | "clear_tip":"清除条目",
93 | "settings_tip":"设置",
94 | "tray_tip":"缩小到任务栏"
95 | },
96 | "interface":{
97 | "computername":"计算机名称",
98 | "domain":"域名",
99 | "workgroup":"工作组",
100 | "adapterDesc":"描述",
101 | "mac":"MAC 地址",
102 | "select":"选择网络适配器",
103 | "profiles":"配置文件",
104 | "profileprops":"配置文件IP属性",
105 | "currentprops":"当前网络适配器属性",
106 | "restarting":"正在重启",
107 | "props":{
108 | "ip":"IP 地址",
109 | "subnet":"子网掩码",
110 | "gateway":"网关",
111 | "dnsPref":"首选DNS服务器",
112 | "dnsAlt":"备用DNS服务器",
113 | "dhcpServer":"DHCP 服务器",
114 | "adapterState":"网络适配器状态",
115 | "adapterStateEnabled":"已启用",
116 | "adapterStateDisabled":"已禁用",
117 | "adapterStateUnplugged":"线缆未连接",
118 | "ipauto":"自动获取 IP 地址",
119 | "ipmanual":"手动设置 IP 地址",
120 | "dnsauto":"自动获取 DNS 地址",
121 | "dnsmanual":"手动设置 DNS 地址",
122 | "dnsreg":"注册地址",
123 | "memo":"Memo"
124 | }
125 | },
126 | "updates":{
127 | "title":"检查更新",
128 | "thisVersion":"当前版本",
129 | "latestVersion":"最新版本",
130 | "newMessage":"有新版本可用",
131 | "latestMessage":"您在使用最新版本"
132 | },
133 | "about":{
134 | "title":"关于",
135 | "version":"版本",
136 | "date":"日期",
137 | "dev":"开发者",
138 | "lic":"License",
139 | "desc":"The portable ip changer utility that allows a user to quickly and easily change the most common network settings for any connection.",
140 | "icons":"Program icons are from"
141 | },
142 | "changelog":{
143 | "changelog":"更新日志"
144 | },
145 | "blacklist":{
146 | "title":"网络适配器黑名单",
147 | "heading":"选择要隐藏的网络适配器"
148 | },
149 | "settings":{
150 | "title":"设置",
151 | "lang":"语言",
152 | "opt1":"开启时最小化",
153 | "opt2":"最小化到状态栏",
154 | "opt3":"保存到配置",
155 | "opt4":"自动检查更新"
156 | },
157 | "message":{
158 | "ready":"已完成",
159 | "timedout":"操作超时!命令已中止。",
160 | "couldNotSave":"无法保存到所选位置!",
161 | "updatingList":"正在更新网络适配器列表...",
162 | "selectAdapter":"重新选择网络适配器并重试",
163 | "enterIP":"请输入IP地址",
164 | "enterSubnet":"请输入子网掩码",
165 | "settingIP":"正在设置静态IP地址...",
166 | "settingDnsDhcp":"正在设置DNS DHCP...",
167 | "settingDnsPref":"正在设置首选DNS服务器...",
168 | "settingDnsAlt":"正在设置备用DNS服务器...",
169 | "errorOccurred":"发生错误",
170 | "profileNameExists":"配置文件名称已存在!",
171 | "noProfileSel":"未选择配置文件!",
172 | "profilesNotFound":"找不到 Profiles.ini 文件-将创建一个新文件",
173 | "errorReadingProf":" profiles.ini读取出错",
174 | "adapterNotFound":"找不到网络适配器",
175 | "error":"错误",
176 | "warning":"警告",
177 | "newItem":"新建条目",
178 | "applying":"正在应用配置文件",
179 | "errorRetrieving":"检索网络适配器时出现问题.",
180 | "commandTimeout":"命令超时",
181 | "updateCheckError":"检索更新时遇到错误.",
182 | "checkConnect":"检查您的互联网连接.",
183 | "errorCode":"错误代码",
184 | "newVersion":"有新版本可用",
185 | "currentVersion":"您在使用最新版本.",
186 | "yourVersion":"您的版本是",
187 | "latestVersion":"最新版本为",
188 | "loadedFile":"已加载文件",
189 | "doneImporting":"配置文件导入完成",
190 | "fileSaved":"文件已保存"
191 | },
192 | "dialog":{
193 | "selectFile":"选择文件",
194 | "ini":"INI 文件"
195 | }
196 | }
197 | }
198 |
--------------------------------------------------------------------------------
/libraries/GetInstalledPath.au3:
--------------------------------------------------------------------------------
1 | ; #FUNCTION# ====================================================================================================================
2 | ; Name...........: _GetInstalledPath
3 | ; Description ...: Returns the installed path for specified program
4 | ; Syntax.........: GetInstalledPath($sProgamName)
5 | ; Parameters ....: $sProgamName - Name of program to seaach for
6 | ; - Must be exactly as it appears in the registry unless extended search is used
7 | ; $sDisplayName - Returns the "displayName" key from for the program (can be used to check you have the right program)
8 | ; $fExtendedSearchFlag - True - Search for $sProgamName in "DisplayName" Key
9 | ; $fSlidingSearch - True - Find $sProgamName anywhere in "DisplayName" Key
10 | ; False - Must be exact match
11 | ; Return values .: Success - returns the install path
12 | ; -
13 | ; Failure - 0
14 | ; |@Error - 1 = Unable to find entry in registry
15 | ; |@Error - 2 = No "InstalledLocation" key
16 | ; Author ........: John Morrison aka Storm-E
17 | ; Remarks .......: V1.5 Added scan for $sProgamName in "DisplayName" Thanks to JFX for the idea
18 | ; : V1.6 Fix for 64bit systems
19 | ; : V2 Added support for multiple paths (32,64&Wow6432Node) for uninstall key
20 | ; : returns display name for the program (script breaking change)
21 | ; : If the Uninstall key is not found it now uses the path from "DisplayIcon" key (AutoitV3 doesn't have an Uninstall Key)
22 | ; Related .......:
23 | ; Link ..........:
24 | ; Example .......: Yes
25 | ; AutoIT link ...; http://www.autoitscript.com/forum/topic/139761-getinstalledpath-from-uninstall-key-in-registry/
26 | ; ===============================================================================================================================
27 | Func _GetInstalledPath($sProgamName, ByRef $sDisplayName, $fExtendedSearchFlag = True, $fSlidingSearch = True)
28 |
29 | ;Using WMI : Why I diddn't use "Win32_Product" instead of the reg searching.
30 | ;http://provincialtech.com/wordpress/2012/05/15/wmi-win32_product-vs-win32_addremoveprograms/
31 |
32 | Local $asBasePath[3] = ["hklm\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\", "hklm64\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\", "hklm\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\"]
33 | Local $sBasePath ; base for registry search
34 | Local $sCurrentKey ; Holds current key during search
35 | Local $iCurrentKeyIndex ; Index to current key
36 | Local $iErrorCode = 0 ; Store return error code
37 | Local $sInstalledPath = "" ; the found installed path
38 |
39 | $iErrorCode = 0
40 | For $sBasePath In $asBasePath
41 | $sInstalledPath = RegRead($sBasePath & $sProgamName, "InstallLocation")
42 | If @error = -1 Then
43 | ;Unable To open "InstallLocation" key so try "DisplayIcon"
44 | ;"DisplayIcon" is usually the main EXE so should be the install path
45 | $sInstalledPath = RegRead($sBasePath & $sProgamName, "DisplayIcon")
46 | If @error = -1 Then
47 | ; Unable to find path so give-up
48 | $iErrorCode = 2 ; Path Not found
49 | $sInstalledPath = ""
50 | $sDisplayName = ""
51 | Else
52 | $sDisplayName = RegRead($sBasePath & $sProgamName, "DisplayName")
53 | $sInstalledPath = StringLeft($sInstalledPath, StringInStr($sInstalledPath, "\", 0, -1))
54 | EndIf
55 | EndIf
56 | If $sInstalledPath <> "" Then
57 | ExitLoop
58 | EndIf
59 | Next
60 |
61 | If $sInstalledPath = "" Then
62 | ; Didn't find path by direct key request so try a search
63 | ;Key not found
64 | $iErrorCode = 0;
65 | If $fExtendedSearchFlag Then
66 | For $sBasePath In $asBasePath
67 | $iCurrentKeyIndex = 1 ;reset for next run
68 | While $fExtendedSearchFlag
69 | $sCurrentKey = RegEnumKey($sBasePath, $iCurrentKeyIndex)
70 | If @error Then
71 | ;No keys left
72 | $iErrorCode = 1 ; Path Not found
73 | ExitLoop
74 | Else
75 | $sDisplayName = RegRead($sBasePath & $sCurrentKey, "DisplayName")
76 | EndIf
77 |
78 | If ($fSlidingSearch And StringInStr($sDisplayName, $sProgamName)) Or ($sDisplayName = $sProgamName) Then
79 | ;Program name found in DisplayName
80 | $sInstalledPath = RegRead($sBasePath & $sCurrentKey , "InstallLocation")
81 | If @error Then
82 | ;Unable To open "InstallLocation" key so try "DisplayIcon"
83 | ;"DisplayIcon" is usually the main EXE so should be the install path
84 | $sInstalledPath = RegRead($sBasePath & $sCurrentKey, "DisplayIcon")
85 | If @error = -1 Then
86 | ; Unable to find path so give-up
87 | $iErrorCode = 2 ; Path Not found
88 | $sInstalledPath = ""
89 | $sDisplayName = ""
90 | Else
91 | $sInstalledPath = StringLeft($sInstalledPath, StringInStr($sInstalledPath, "\", 0, -1))
92 | EndIf
93 | ExitLoop
94 | EndIf
95 | ExitLoop
96 | EndIf
97 | $iCurrentKeyIndex += 1
98 | WEnd
99 | If $sInstalledPath <> "" Then
100 | ; Path found so stop looking
101 | ExitLoop
102 | EndIf
103 | Next
104 | Else
105 | $sDisplayName = ""
106 | Return SetError(1, 0, "") ; Path Not found
107 | EndIf
108 | Else
109 | Return $sInstalledPath
110 | EndIf
111 |
112 | If $sInstalledPath = "" Then
113 | ; program not found
114 | $sDisplayName = ""
115 | Return SetError($iErrorCode, 0, "")
116 | Else
117 | Return $sInstalledPath
118 | EndIf
119 | EndFunc ;==>_GetInstalledPath
--------------------------------------------------------------------------------
/libraries/GuiFlatToolbar.au3:
--------------------------------------------------------------------------------
1 | #include "GuiFlatButton.au3"
2 | #include
3 |
4 | ;~ Opt("GUIOnEventMode", 1)
5 |
6 | Global $GFTB_TOP = 1, $GFTB_BOTTOM = 2, $GFTB_LEFT = 4, $GFTB_RIGHT = 8, $GFTB_VERTICAL = 16, $GFTB_EXTEND = 32
7 | ;~ Global $label1
8 |
9 | ;set up toolbar button colors
10 | ;~ Global $aColorsEx = _
11 | ;~ [0x666666, 0xFFFFFF, 0x666666, _ ; normal : Background, Text, Border
12 | ;~ 0x636363, 0xFFFFFF, 0x757575, _ ; focus : Background, Text, Border
13 | ;~ 0x888888, 0xFFFFFF, 0x999999, _ ; hover : Background, Text, Border
14 | ;~ 0x555555, 0xFFFFFF, 0x444444] ; selected : Background, Text, Border
15 |
16 | ;~ Example()
17 |
18 | ;buttons with Icon images
19 | ;event mode demonstration
20 | ;~ Func Example()
21 | ;~ ;get icons for demonstration
22 | ;~ Local $hIcon1 = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 47, 16, 16)
23 | ;~ Local $hIcon2 = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 258, 16, 16)
24 | ;~ Local $hIcon3 = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 62, 16, 16)
25 | ;~ Local $hIcon4 = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 208, 16, 16)
26 | ;~ ;get icons for demonstration
27 | ;~ Local $hIcon5 = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 47, 16, 16)
28 | ;~ Local $hIcon6 = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 258, 16, 16)
29 | ;~ Local $hIcon7 = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 62, 16, 16)
30 | ;~ Local $hIcon8 = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 208, 16, 16)
31 |
32 |
33 | ;~ ;create GUI
34 | ;~ Local $hGUI = GUICreate("GuiFlatButton Ex5", 500, 400, -1, -1)
35 | ;~ GUISetOnEvent($GUI_EVENT_CLOSE, "_onExit")
36 | ;~ GUISetBkColor(0xBDBDBD)
37 | ;~ $label1 = GUICtrlCreateLabel("Click a button", 5, 75)
38 | ;~ GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
39 |
40 | ;~ ;create horizontal toolbar and add buttons
41 | ;~ $oToolbar = _GuiFlatToolbarCreate(-1, 0, 0, 48, 38, $aColorsEx) ;create a new toolbar and extend
42 | ;~ _GuiFlatToolbar_SetBkColor($oToolbar, 0x444444) ;add a new button and associate an icon
43 | ;~ $tbLock = _GuiFlatToolbar_AddButton($oToolbar, "Lock", $hIcon1)
44 | ;~ GUICtrlSetTip(-1, "Lock Button")
45 | ;~ GUICtrlSetOnEvent(-1, "tbEvent")
46 | ;~ $GFTBave = _GuiFlatToolbar_AddButton($oToolbar, "Save", $hIcon2)
47 | ;~ GUICtrlSetTip(-1, "Save Button")
48 | ;~ GUICtrlSetOnEvent(-1, "tbEvent")
49 | ;~ $tbDel = _GuiFlatToolbar_AddButton($oToolbar, "Delete", $hIcon3)
50 | ;~ GUICtrlSetTip(-1, "Delete Button")
51 | ;~ GUICtrlSetOnEvent(-1, "tbEvent")
52 | ;~ $tbFav = _GuiFlatToolbar_AddButton($oToolbar, "Favorite", $hIcon4)
53 | ;~ GUICtrlSetTip(-1, "Favorite Button")
54 | ;~ GUICtrlSetOnEvent(-1, "tbEvent")
55 |
56 | ;~ ;create vertical toolbar and add buttons
57 | ;~ $oToolbar2 = _GuiFlatToolbarCreate(BitOR($GFTB_VERTICAL, $GFTB_RIGHT), 0, 0, 20, 20, $aColorsEx) ;create a new vertical toolbar
58 | ;~ $tb1 = _GuiFlatToolbar_AddButton($oToolbar2, "", $hIcon1)
59 | ;~ GUICtrlSetTip(-1, "Lock Button")
60 | ;~ $tb2 = _GuiFlatToolbar_AddButton($oToolbar2, "", $hIcon2)
61 | ;~ GUICtrlSetTip(-1, "Save Button")
62 | ;~ $tb3 = _GuiFlatToolbar_AddButton($oToolbar2, "", $hIcon3)
63 | ;~ GUICtrlSetTip(-1, "Delete Button")
64 | ;~ $tb4 = _GuiFlatToolbar_AddButton($oToolbar2, "", $hIcon4)
65 | ;~ GUICtrlSetTip(-1, "Favorite Button")
66 |
67 | ;~ ;clean up the icons because we do not need them anymore
68 | ;~ _WinAPI_DestroyIcon($hIcon1)
69 | ;~ _WinAPI_DestroyIcon($hIcon2)
70 | ;~ _WinAPI_DestroyIcon($hIcon3)
71 | ;~ _WinAPI_DestroyIcon($hIcon4)
72 |
73 | ;~ GUISetState(@SW_SHOW, $hGUI)
74 | ;~ While 1
75 | ;~ Sleep(10)
76 | ;~ WEnd
77 | ;~ EndFunc ;==>Example
78 |
79 | ;~ Func tbEvent()
80 | ;~ GUICtrlSetData($label1, GUICtrlRead(@GUI_CtrlId))
81 | ;~ EndFunc ;==>tbEvent
82 |
83 | ;~ Func _onExit()
84 | ;~ GUIDelete()
85 | ;~ Exit
86 | ;~ EndFunc ;==>_onExit
87 |
88 | ;default style is horizontal, extend, top
89 | Func _GuiFlatToolbarCreate($iStyle = -1, $iOffsetX = 0, $iOffsetY = 0, $iButtonWidth = 50, $iButtonHeight = 50, $aColorsEx = 0)
90 | If $iStyle = -1 Then
91 | $iStyle = 33
92 | EndIf
93 |
94 | Local $aToolBar[1][12]
95 |
96 | Local $bExtend = (BitAND($iStyle, $GFTB_EXTEND) = $GFTB_EXTEND)
97 | Local $bVertical = (BitAND($iStyle, $GFTB_VERTICAL) = $GFTB_VERTICAL)
98 | Local $bTop = (BitAND($iStyle, $GFTB_TOP) = $GFTB_TOP)
99 | Local $bBottom = (BitAND($iStyle, $GFTB_BOTTOM) = $GFTB_BOTTOM)
100 | Local $bLeft = (BitAND($iStyle, $GFTB_LEFT) = $GFTB_LEFT)
101 | Local $bRight = (BitAND($iStyle, $GFTB_RIGHT) = $GFTB_RIGHT)
102 | Local $x, $y, $w, $h
103 |
104 | $aToolBar[0][0] = 0
105 | $aToolBar[0][1] = Toolbar_getParent()
106 | ;$aToolBar[0][2] child gui set below
107 | $aToolBar[0][3] = $iStyle
108 | $aToolBar[0][4] = $iOffsetX
109 | $aToolBar[0][5] = $iOffsetY
110 | $aToolBar[0][6] = $iButtonWidth
111 | $aToolBar[0][7] = $iButtonHeight
112 | $aToolBar[0][8] = $aColorsEx
113 |
114 | If $bExtend Then
115 | Local $aClientSize = WinGetClientSize($aToolBar[0][1])
116 | If IsArray($aClientSize) Then
117 | If $bVertical Then
118 | $w = $iButtonWidth
119 | $h = $aClientSize[1] - $iOffsetY
120 | If $bRight Then
121 | $x = $aClientSize[0] - $iButtonWidth - $iOffsetX
122 | Else
123 | $x = $iOffsetX
124 | EndIf
125 |
126 | If $bBottom Then
127 | $y = 0
128 | Else
129 | $y = $iOffsetY
130 | EndIf
131 | Else
132 | $w = $aClientSize[0] - $iOffsetX
133 | $h = $iButtonHeight
134 | If $bRight Then
135 | $x = 0
136 | Else
137 | $x = $iOffsetX
138 | EndIf
139 |
140 | If $bBottom Then
141 | $y = $aClientSize[1] - $iButtonHeight - $iOffsetY
142 | Else
143 | $y = $iOffsetY
144 | EndIf
145 | EndIf
146 | EndIf
147 | Else
148 | Local $aClientSize = WinGetClientSize($aToolBar[0][1])
149 | If IsArray($aClientSize) Then
150 | If $bVertical Then
151 | $w = $iButtonWidth
152 | $h = 0
153 | If $bRight Then
154 | $x = $aClientSize[0] - $iButtonWidth - $iOffsetX
155 | Else
156 | $x = $iOffsetX
157 | EndIf
158 |
159 | If $bBottom Then
160 | $y = $aClientSize[1] - $iOffsetY
161 | Else
162 | $y = $iOffsetY
163 | EndIf
164 | Else
165 | $w = 0
166 | $h = $iButtonHeight
167 | If $bRight Then
168 | $x = $aClientSize[0] - $iOffsetX
169 | Else
170 | $x = $iOffsetX
171 | EndIf
172 |
173 | If $bBottom Then
174 | $y = $aClientSize[1] - $iButtonHeight - $iOffsetY
175 | Else
176 | $y = $iOffsetY
177 | EndIf
178 | EndIf
179 | EndIf
180 | EndIf
181 |
182 | $aToolBar[0][2] = GUICreate("", $w, $h, $x, $y, BitOR($WS_CHILD, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS), -1, $aToolBar[0][1])
183 | _WinAPI_SetWindowPos($aToolBar[0][2], $HWND_TOP, 0, 0, 0, 0, BitOR($SWP_NOMOVE, $SWP_NOSIZE))
184 | GUISetState(@SW_SHOWNOACTIVATE)
185 | Return $aToolBar
186 | EndFunc ;==>_GuiFlatToolbarCreate
187 |
188 | Func _GuiFlatToolbar_AddButton(ByRef $aToolBar, $sText = "", $hIcon = Null, $iPadding=0)
189 | Local $TB_BUTTON = 0, $TB_BUTTONSEP = 1
190 |
191 | Local $hWnd = $aToolBar[0][1]
192 | Local $hWndChild = $aToolBar[0][2]
193 | Local $iStyle = $aToolBar[0][3]
194 | Local $iOffsetX = $aToolBar[0][4]
195 | Local $iOffsetY = $aToolBar[0][5]
196 | Local $iButtonWidth = $aToolBar[0][6]
197 | Local $iButtonHeight = $aToolBar[0][7]
198 | Local $aColorsEx = $aToolBar[0][8]
199 |
200 | Local $bExtend = (BitAND($iStyle, $GFTB_EXTEND) = $GFTB_EXTEND)
201 | Local $bVertical = (BitAND($iStyle, $GFTB_VERTICAL) = $GFTB_VERTICAL)
202 | Local $bTop = (BitAND($iStyle, $GFTB_TOP) = $GFTB_TOP)
203 | Local $bBottom = (BitAND($iStyle, $GFTB_BOTTOM) = $GFTB_BOTTOM)
204 | Local $bLeft = (BitAND($iStyle, $GFTB_LEFT) = $GFTB_LEFT)
205 | Local $bRight = (BitAND($iStyle, $GFTB_RIGHT) = $GFTB_RIGHT)
206 | Local $x, $y, $w, $h, $xWnd, $yWnd
207 |
208 | ; See if there is a blank line available in the array
209 | Local $iIndex = 0
210 | For $i = 1 To $aToolBar[0][0]
211 | If $aToolBar[$i][0] = 0 Then
212 | $iIndex = $i
213 | ExitLoop
214 | EndIf
215 | Next
216 | ; If no blank line found then increase array size
217 | If $iIndex == 0 Then
218 | $aToolBar[0][0] += 1
219 | ReDim $aToolBar[$aToolBar[0][0] + 1][UBound($aToolBar, 2)]
220 | EndIf
221 | Local $count = $aToolBar[0][0]
222 |
223 | $flags = 0
224 | If $bExtend Then
225 | Local $aClientSize = WinGetClientSize($aToolBar[0][1])
226 | If IsArray($aClientSize) Then
227 | If $bVertical Then
228 | $x = 0
229 | If $bBottom Then
230 | $y = $aClientSize[1] - $iButtonHeight
231 | Else
232 | $y = ($count - 1) * $iButtonHeight
233 | EndIf
234 | Else
235 | If $bRight Then
236 | $x = $aClientSize[0] - $iButtonWidth
237 | Else
238 | $x = ($count - 1) * $iButtonWidth
239 | EndIf
240 | $y = 0
241 | EndIf
242 | EndIf
243 | $flags = BitOR($SWP_NOMOVE, $SWP_NOSIZE)
244 | Else
245 | Local $aClientSize = WinGetClientSize($aToolBar[0][1])
246 | If IsArray($aClientSize) Then
247 | If $bVertical Then
248 | $w = $iButtonWidth
249 | $h = $count * $iButtonHeight
250 | $x = 0
251 | $y = ($count - 1) * $iButtonHeight
252 |
253 | If $bRight Then
254 | $xWnd = $aClientSize[0] - $iButtonWidth - $iOffsetX
255 | Else
256 | $xWnd = $iOffsetX
257 | EndIf
258 |
259 | If $bBottom Then
260 | $yWnd = $aClientSize[1] - ($count - 1) * $iButtonHeight - $iOffsetY
261 | Else
262 | $yWnd = $iOffsetY
263 | EndIf
264 | Else
265 | $w = $count * $iButtonWidth
266 | $h = $iButtonHeight
267 | $x = ($count - 1) * $iButtonHeight
268 | $y = 0
269 |
270 | If $bRight Then
271 | $xWnd = $aClientSize[0] - ($count - 1) * $iButtonWidth - $iOffsetX
272 | Else
273 | $xWnd = $iOffsetX
274 | EndIf
275 |
276 | If $bBottom Then
277 | $yWnd = $aClientSize[1] - $iButtonHeight - $iOffsetY
278 | Else
279 | $yWnd = $iOffsetY
280 | EndIf
281 | EndIf
282 | EndIf
283 | EndIf
284 |
285 | GUISwitch($hWndChild)
286 |
287 | $aToolBar[$i][0] = GuiFlatButton_Create($sText, $x, $y, $iButtonWidth, $iButtonHeight, BitOR($BS_TOOLBUTTON, $BS_BOTTOM))
288 | $aToolBar[$i][1] = $TB_BUTTON
289 | Local $parentWnd = _WinAPI_GetParent(GUICtrlGetHandle($aToolBar[$i][0]))
290 | GUISetStyle(-1, 0, $parentWnd) ;remove $WS_EX_CONTROLPARENT style to prevent dragging of the toolbar
291 | If IsArray($aColorsEx) Then
292 | GuiFlatButton_SetColorsEx($aToolBar[$i][0], $aColorsEx)
293 | EndIf
294 | If $hIcon <> Null Then
295 | _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($aToolBar[$i][0]), $BM_SETIMAGE, $IMAGE_ICON, $hIcon))
296 | EndIf
297 |
298 | GUISwitch($hWnd)
299 |
300 | If Not $bExtend Then
301 | _WinAPI_SetWindowPos($hWndChild, $HWND_TOP, $xWnd, $yWnd, $w, $h, 0)
302 | EndIf
303 |
304 | If $bExtend And $bVertical And $bBottom Then
305 | For $j = 1 To $count - 1
306 | ;~ GUICtrlSetPos($aToolBar[$j][0], $x, ($j-1)*$iButtonHeight)
307 | GuiFlatButton_SetPos($aToolBar[$j][0], $x, $aClientSize[1] - $count * $iButtonHeight + ($j - 1) * $iButtonHeight)
308 | Next
309 | ElseIf $bExtend And Not $bVertical And $bRight Then
310 | For $j = 1 To $count - 1
311 | ;~ GUICtrlSetPos($aToolBar[$j][0], $aClientSize[0] - $count*$iButtonWidth + ($j-1)*$iButtonWidth, $y)
312 | GuiFlatButton_SetPos($aToolBar[$j][0], $aClientSize[0] - $count * $iButtonWidth + ($j - 1) * $iButtonWidth, $y)
313 | ConsoleWrite($aClientSize[0] - $count * $iButtonWidth + ($j - 1) * $iButtonWidth & @CRLF)
314 | Next
315 | EndIf
316 |
317 |
318 | Return $aToolBar[$i][0]
319 | EndFunc ;==>_GuiFlatToolbar_AddButton
320 |
321 | Func _GuiFlatToolbar_SetAutoWidth(ByRef $aToolBar)
322 | If Not IsArray($aToolBar) Then Return -1
323 | Local $stringsize, $string, $maxWidth
324 | For $i = 1 To $aToolBar[0][0]
325 | $string = GUICtrlRead($aToolBar[$i][0])
326 | $stringsize = _StringSize($string, $MyGlobalFontSize, 400, 0, $MyGlobalFontName)
327 | If $stringsize[2] > $maxWidth Then
328 | $maxWidth = $stringsize[2]
329 | EndIf
330 | Next
331 | Local $padding = 10
332 | $aToolBar[0][6] = $maxWidth + $padding
333 |
334 | ;~ Local $athisPos = GuiFlatButton_GetPos($aToolBar[1][0])
335 | ;~ Local $athisPos2 = ControlGetPos(GUICtrlGetHandle($aToolBar[1][0]),"",0)
336 | Local $thisX = 0
337 | ;~ ConsoleWrite($athisPos[3] & @CRLF)
338 | For $i = 1 To $aToolBar[0][0]
339 | GuiFlatButton_SetPos($aToolBar[$i][0], $thisX, 0, $aToolBar[0][6], $aToolBar[0][7])
340 | $thisX += $aToolBar[0][6]
341 | Next
342 |
343 | EndFunc ;==>_GuiFlatToolbar_SetAutoWidth
344 |
345 | Func _GuiFlatToolbar_SetBkColor(ByRef $aToolBar, $bkColor)
346 | If Not IsArray($aToolBar) Then Return -1
347 |
348 | GUISetBkColor($bkColor, $aToolBar[0][2])
349 |
350 | Return 0
351 | EndFunc ;==>_GuiFlatToolbar_SetBkColor
352 |
353 | Func _GuiFlatToolbar_SetIcon(ByRef $aToolBar, $bkColor)
354 | If Not IsArray($aToolBar) Then Return -1
355 |
356 | GUISetBkColor($bkColor, $aToolBar[0][2])
357 |
358 | Return 0
359 | EndFunc ;==>_GuiFlatToolbar_SetIcon
360 |
361 | Func _GuiFlatToolbar_DeleteAll(ByRef $aToolBar)
362 | For $i = 1 To $aToolBar[0][0]
363 | GuiFlatButton_Delete($aToolBar[$i][0])
364 | Next
365 | EndFunc
366 |
367 |
368 | ; #INTERNAL_USE_ONLY# ===========================================================================================================
369 | ; Name...........: GuiFlatButton_getParent
370 | ; Description ...: Get handle to parent window
371 | ; Author ........: kurtykurtyboy
372 | ; Modified ......:
373 | ; ===============================================================================================================================
374 | Func Toolbar_getParent()
375 | ;create temporary label so we can get a handle to its parent
376 | Local $templabel = GUICtrlCreateLabel("", 0, 0, 0, 0)
377 | Local $parentHWND = _WinAPI_GetParent(GUICtrlGetHandle($templabel))
378 | GUICtrlDelete($templabel)
379 | Return $parentHWND
380 | EndFunc ;==>Toolbar_getParent
381 |
--------------------------------------------------------------------------------
/libraries/Json/BinaryCall.au3:
--------------------------------------------------------------------------------
1 | ; =============================================================================
2 | ; AutoIt BinaryCall UDF (2014.7.24)
3 | ; Purpose: Allocate, Decompress, And Prepare Binary Machine Code
4 | ; Author: Ward
5 | ; =============================================================================
6 |
7 | #Include-once
8 |
9 | Global $__BinaryCall_Kernel32dll = DllOpen('kernel32.dll')
10 | Global $__BinaryCall_Msvcrtdll = DllOpen('msvcrt.dll')
11 | Global $__BinaryCall_LastError = ""
12 |
13 | Func _BinaryCall_GetProcAddress($Module, $Proc)
14 | Local $Ret = DllCall($__BinaryCall_Kernel32dll, 'ptr', 'GetProcAddress', 'ptr', $Module, 'str', $Proc)
15 | If @Error Or Not $Ret[0] Then Return SetError(1, @Error, 0)
16 | Return $Ret[0]
17 | EndFunc
18 |
19 | Func _BinaryCall_LoadLibrary($Filename)
20 | Local $Ret = DllCall($__BinaryCall_Kernel32dll, "handle", "LoadLibraryW", "wstr", $Filename)
21 | If @Error Then Return SetError(1, @Error, 0)
22 | Return $Ret[0]
23 | EndFunc
24 |
25 | Func _BinaryCall_lstrlenA($Ptr)
26 | Local $Ret = DllCall($__BinaryCall_Kernel32dll, "int", "lstrlenA", "ptr", $Ptr)
27 | If @Error Then Return SetError(1, @Error, 0)
28 | Return $Ret[0]
29 | EndFunc
30 |
31 | Func _BinaryCall_Alloc($Code, $Padding = 0)
32 | Local $Length = BinaryLen($Code) + $Padding
33 | Local $Ret = DllCall($__BinaryCall_Kernel32dll, "ptr", "VirtualAlloc", "ptr", 0, "ulong_ptr", $Length, "dword", 0x1000, "dword", 0x40)
34 | If @Error Or Not $Ret[0] Then Return SetError(1, @Error, 0)
35 | If BinaryLen($Code) Then
36 | Local $Buffer = DllStructCreate("byte[" & $Length & "]", $Ret[0])
37 | DllStructSetData($Buffer, 1, $Code)
38 | EndIf
39 | Return $Ret[0]
40 | EndFunc
41 |
42 | Func _BinaryCall_RegionSize($Ptr)
43 | Local $Buffer = DllStructCreate("ptr;ptr;dword;uint_ptr;dword;dword;dword")
44 | Local $Ret = DllCall($__BinaryCall_Kernel32dll, "int", "VirtualQuery", "ptr", $Ptr, "ptr", DllStructGetPtr($Buffer), "uint_ptr", DllStructGetSize($Buffer))
45 | If @Error Or $Ret[0] = 0 Then Return SetError(1, @Error, 0)
46 | Return DllStructGetData($Buffer, 4)
47 | EndFunc
48 |
49 | Func _BinaryCall_Free($Ptr)
50 | Local $Ret = DllCall($__BinaryCall_Kernel32dll, "bool", "VirtualFree", "ptr", $Ptr, "ulong_ptr", 0, "dword", 0x8000)
51 | If @Error Or $Ret[0] = 0 Then
52 | $Ret = DllCall($__BinaryCall_Kernel32dll, "bool", "GlobalFree", "ptr", $Ptr)
53 | If @Error Or $Ret[0] <> 0 Then Return SetError(1, @Error, False)
54 | EndIf
55 | Return True
56 | EndFunc
57 |
58 | Func _BinaryCall_Release($CodeBase)
59 | Local $Ret = _BinaryCall_Free($CodeBase)
60 | Return SetError(@Error, @Extended, $Ret)
61 | EndFunc
62 |
63 | Func _BinaryCall_MemorySearch($Ptr, $Length, $Binary)
64 | Static $CodeBase
65 | If Not $CodeBase Then
66 | If @AutoItX64 Then
67 | $CodeBase = _BinaryCall_Create('0x4883EC084D85C94889C8742C4C39CA72254C29CA488D141131C9EB0848FFC14C39C97414448A1408453A140874EE48FFC04839D076E231C05AC3', '', 0, True, False)
68 | Else
69 | $CodeBase = _BinaryCall_Create('0x5589E58B4D14578B4508568B550C538B7D1085C9742139CA721B29CA8D341031D2EB054239CA740F8A1C17381C1074F34039F076EA31C05B5E5F5DC3', '', 0, True, False)
70 | EndIf
71 | If Not $CodeBase Then Return SetError(1, 0, 0)
72 | EndIf
73 |
74 | $Binary = Binary($Binary)
75 | Local $Buffer = DllStructCreate("byte[" & BinaryLen($Binary) & "]")
76 | DllStructSetData($Buffer, 1, $Binary)
77 |
78 | Local $Ret = DllCallAddress("ptr:cdecl", $CodeBase, "ptr", $Ptr, "uint", $Length, "ptr", DllStructGetPtr($Buffer), "uint", DllStructGetSize($Buffer))
79 | Return $Ret[0]
80 | EndFunc
81 |
82 | Func _BinaryCall_Base64Decode($Src)
83 | Static $CodeBase
84 | If Not $CodeBase Then
85 | If @AutoItX64 Then
86 | $CodeBase = _BinaryCall_Create('0x41544989CAB9FF000000555756E8BE000000534881EC000100004889E7F3A44C89D6E98A0000004439C87E0731C0E98D0000000FB66E01440FB626FFC00FB65E020FB62C2C460FB62424408A3C1C0FB65E034189EB41C1E4024183E3308A1C1C41C1FB044509E34080FF634189CC45881C08744C440FB6DFC1E5044489DF4088E883E73CC1FF0209C7418D44240241887C08014883C10380FB63742488D841C1E3064883C60483E03F4409D841884408FF89F389C84429D339D30F8C67FFFFFF4881C4000100005B5E5F5D415CC35EC3E8F9FFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000003E0000003F3435363738393A3B3C3D00000063000000000102030405060708090A0B0C0D0E0F101112131415161718190000000000001A1B1C1D1E1F202122232425262728292A2B2C2D2E2F30313233', '', 132, True, False)
87 | Else
88 | $CodeBase = _BinaryCall_Create('0x55B9FF00000089E531C05756E8F10000005381EC0C0100008B55088DBDF5FEFFFFF3A4E9C00000003B45140F8FC20000000FB65C0A028A9C1DF5FEFFFF889DF3FEFFFF0FB65C0A038A9C1DF5FEFFFF889DF2FEFFFF0FB65C0A018985E8FEFFFF0FB69C1DF5FEFFFF899DECFEFFFF0FB63C0A89DE83E630C1FE040FB6BC3DF5FEFFFFC1E70209FE8B7D1089F3881C074080BDF3FEFFFF63745C0FB6B5F3FEFFFF8BBDECFEFFFF8B9DE8FEFFFF89F083E03CC1E704C1F80209F88B7D1088441F0189D883C00280BDF2FEFFFF6374278A85F2FEFFFFC1E60683C10483E03F09F088441F0289D883C0033B4D0C0F8C37FFFFFFEB0231C081C40C0100005B5E5F5DC35EC3E8F9FFFFFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000003E0000003F3435363738393A3B3C3D00000063000000000102030405060708090A0B0C0D0E0F101112131415161718190000000000001A1B1C1D1E1F202122232425262728292A2B2C2D2E2F30313233', '', 132, True, False)
89 | EndIf
90 | If Not $CodeBase Then Return SetError(1, 0, Binary(""))
91 | EndIf
92 |
93 | $Src = String($Src)
94 | Local $SrcLen = StringLen($Src)
95 | Local $SrcBuf = DllStructCreate("char[" & $SrcLen & "]")
96 | DllStructSetData($SrcBuf, 1, $Src)
97 |
98 | Local $DstLen = Int(($SrcLen + 2) / 4) * 3 + 1
99 | Local $DstBuf = DllStructCreate("byte[" & $DstLen & "]")
100 |
101 | Local $Ret = DllCallAddress("uint:cdecl", $CodeBase, "ptr", DllStructGetPtr($SrcBuf), "uint", $SrcLen, "ptr", DllStructGetPtr($DstBuf), "uint", $DstLen)
102 | If $Ret[0] = 0 Then Return SetError(2, 0, Binary(""))
103 | Return BinaryMid(DllStructGetData($DstBuf, 1), 1, $Ret[0])
104 | EndFunc
105 |
106 | Func _BinaryCall_Base64Encode($Src)
107 | Static $CodeBase
108 | If Not $CodeBase Then
109 | If @AutoItX64 Then
110 | $CodeBase = _BinaryCall_Create('AwAAAARiAQAAAAAAAAArkuFQDAlvIp0qAgbDnjr76UDZs1EPNIP2K18t9s6SNTbd43IB7HfdyPM8VfD/o36z4AmSW2m2AIsC6Af3fKNsHU4BdQKGd0PQXHxPSX0iNqp1YAKovksqQna06NeKMoOYqryTUX4WgpHjokhp6zY2sEFSIjcL7dW3FDoNVz4bGPyZHRvjFwmqvr7YGlNYKwNoh+SYCXmIgVPVZ63Vz1fbT33/QFpWmWOeBRqs4J+c8Qp6zJFsK345Pjw0I8kMSsnho4F4oNzQ2OsAbmIioaQ6Ma2ziw5NH+M+t4SpEeHDnBdUTTL20sxWZ0yKruFAsBIRoHvM7LYcid2eBV2d5roSjnkwMG0g69LNjs1fHjbI/9iU/hJwpSsgl4fltXdZG659/li13UFY89M7UfckiZ9XOeBM0zadgNsy8r8M3rEAAA==')
111 | Else
112 | $CodeBase = _BinaryCall_Create('AwAAAARVAQAAAAAAAAAqr7blBndrIGnmhhfXD7R1fkOTKhicg1W6MCtStbz+CsneBEg0bbHH1sqTLmLfY7A6LqZl6LYWT5ULVj6MXgugPbBn9wKsSU2ZCcBBPNkx09HVPdUaKnbqghDGj/C5SHoF+A/5g+UgE1C5zJZORjJ8ljs5lt2Y9lA4BsY7jVKX2vmDvHK1NnSR6nVwh7Pb+Po/UpNcy5sObVWDKkYSCCtCIjKIYqOe3c6k8Xsp4eritCUprXEVvCFi7K5Z6HFXdm3nZsFcE+eSJ1WkRnVQbWcmpjGMGka61C68+CI7tsQ13UnCFWNSpDrCbzUejMZh8HdPgEc5vCg3pKMKin/NavNpB6+87Y9y7HIxmKsPdjDT30u9hUKWnYiRe3nrwKyVDsiYpKU/Nse368jHag5B5or3UKA+nb2+eY8JwzgA')
113 | EndIf
114 | If Not $CodeBase Then Return SetError(1, 0, Binary(""))
115 | EndIf
116 |
117 | $Src = Binary($Src)
118 | Local $SrcLen = BinaryLen($Src)
119 | Local $SrcBuf = DllStructCreate("byte[" & $SrcLen & "]")
120 | DllStructSetData($SrcBuf, 1, $Src)
121 |
122 | Local $DstLen = Int(($SrcLen + 2) / 3) * 4 + 1
123 | Local $DstBuf = DllStructCreate("char[" & $DstLen & "]")
124 |
125 | Local $Ret = DllCallAddress("uint:cdecl", $CodeBase, "ptr", DllStructGetPtr($SrcBuf), "uint", $SrcLen, "ptr", DllStructGetPtr($DstBuf), "uint", $DstLen)
126 | If $Ret[0] = 0 Then Return Binary("")
127 | Return StringMid(DllStructGetData($DstBuf, 1), 1, $Ret[0])
128 | EndFunc
129 |
130 | Func _BinaryCall_LzmaDecompress($Src)
131 | Static $CodeBase
132 | If Not $CodeBase Then
133 | If @AutoItX64 Then
134 | $CodeBase = _BinaryCall_Create(_BinaryCall_Base64Decode('QVcxwEFWQVVBVFVXSInXVkiJzlMx20iB7OgAAABEiiFBgPzgdgnpyQAAAEGD7C1BiMf/wEGA/Cx38THA6wRBg+wJQYjG/8BBgPwId/GLRglEi24FQQ+2zkyJRCQoRQ+2/0HB5xBBiQFBD7bEAcG4AAMAANPgjYQAcA4AAEhjyOjIBAAATInpSInF6L0EAABIicMxwEyJ8kSI4EyLRCQoiNQl//8A/0QJ+EiF24lFAHQoTYXtdCNIjVfzSI1MJDhIg8YNTIkEJE2J6UmJ2EiJ7+g2AAAAicbrBb4BAAAASInp6IQEAACF9nQKSInZMdvodgQAAEiJ2EiBxOgAAABbXl9dQVxBXUFeQV/DVVNBV0FWQVVBVEFQTQHBQVFNicVRVkgB8lJIieX8SYn0iwdMjX8Eik8Cg8r/0+L30olV6Ijhg8r/0+L30olV5ADBiUXsuAEAAACJReCJRdyJRdhIiUXQRSnJKfaDy/8A0bgAAwAA0+BIjYg2BwAAuAAEAARMif/R6fOrvwUAAADoUAMAAP/PdfdEie9EicgrfSDB4ARBifpEI1XoRAHQTY0cR+hAAwAAD4WTAAAAik3sI33k0+eA6Qj22dPuAfe4AQAAAEiNPH++AAEAAMHnCEGD+QdNjbR/bA4AAHI0TInvSCt90A+2P9HnQYnzIf5BAfNPjRxe6O8CAACJwcHuCIPhATnOvgABAAB1DjnGd9jrDE2J8+jQAgAAOfBy9EyJ76pEiclBg/kEcg65AwAAAEGD+QpyA4PBA0EpyelDAgAAT42cT4ABAADomgIAAHUsi0XcQYP5B4lF4BnAi1XY99CLTdCD4AOJVdxBicGJTdhNjbdkBgAA6akAAABPjZxPmAEAAOhfAgAAdUZEicjB4AREAdBNjZxH4AEAAOhHAgAAdWpBg/kHuQkAAAByA4PBAkGJyUyJ70grfdBIO30gD4L9AQAAigdIA33QqumzAQAAT42cT7ABAADoCgIAAIt12HQhT42cT8gBAADo+AEAAIt13HQJi03ci3XgiU3gi03YiU3ci03QiU3YiXXQQYP5B7kIAAAAcgODwQNBiclNjbdoCgAATYnz6LsBAAB1FESJ0CnJweADvggAAABJjXxGBOs2TY1eAuicAQAAdRpEidC5CAAAAMHgA74IAAAASY28RgQBAADrEUmNvgQCAAC5EAAAAL4AAQAAiU3MuAEAAABJifvoYQEAAInCKfJy8gNVzEGD+QSJVcwPg7kAAABBg8EHuQMAAAA50XICidHB4Qa4AQAAAEmNvE9gAwAAvkAAAABJifvoHwEAAEGJwkEp8nLwQYP6BHJ4RInWRIlV0NHug2XQAf/Og03QAkGD+g5zFYnx0mXQi0XQRCnQTY20R14FAADrLIPuBOi6AAAA0evRZdBBOdhyBv9F0EEp2P/OdedNjbdEBgAAwWXQBL4EAAAAvwEAAACJ+E2J8+ioAAAAqAF0Awl90NHn/8516+sERIlV0P9F0EyJ74tNzEiJ+IPBAkgrRSBIOUXQd1RIif5IK3XQSItVGKyqSDnXcwT/yXX1SYn9D7bwTDttGA+C9fz//+gwAAAAKcBIi1UQTCtlCESJIkiLVWBMK20gRIkqSIPEKEFcQV1BXUFfW13DXli4AQAAAOvSgfsAAAABcgHDweMITDtlAHPmQcHgCEWKBCRJg8QBwynATY0cQ4H7AAAAAXMVweMITDtlAHPBQcHgCEWKBCRJg8QBidlBD7cTwekLD6/KQTnIcxOJy7kACAAAKdHB6QVmQQELAcDDKcvB6gVBKchmQSkTAcCDwAHDSLj////////////gbXN2Y3J0LmRsbHxtYWxsb2MASLj////////////gZnJlZQA='))
135 | Else
136 | $CodeBase = _BinaryCall_Create(_BinaryCall_Base64Decode('VYnlVzH/VlOD7EyLXQiKC4D54A+HxQAAADHA6wWD6S2I0ID5LI1QAXfziEXmMcDrBYPpCYjQgPkIjVABd/OIReWLRRSITeSLUwkPtsmLcwWJEA+2ReUBwbgAAwAA0+CNhABwDgAAiQQk6EcEAACJNCSJRdToPAQAAItV1InHi0Xkhf+JArgBAAAAdDaF9nQyi0UQg8MNiRQkiXQkFIl8JBCJRCQYjUXgiUQkDItFDIlcJASD6A2JRCQI6CkAAACLVdSJRdSJFCToAQQAAItF1IXAdAqJPCQx/+jwAwAAg8RMifhbXl9dw1dWU1WJ5YtFJAFFKFD8i3UYAXUcVot1FK2SUopO/oPI/9Pg99BQiPGDyP/T4PfQUADRifeD7AwpwEBQUFBQUFcp9laDy/+4AAMAANPgjYg2BwAAuAAEAATR6fOragVZ6MoCAADi+Yt9/ItF8Ct9JCH4iUXosADoywIAAA+FhQAAAIpN9CN97NPngOkI9tnT7lgB916NPH/B5wg8B1qNjH5sDgAAUVa+AAEAAFCwAXI0i338K33cD7Y/i23M0eeJ8SH+AfGNbE0A6JgCAACJwcHuCIPhATnOvgABAAB1DjnwctfrDIttzOh5AgAAOfBy9FqD+gSJ0XIJg/oKsQNyArEGKcpS60mwwOhJAgAAdRRYX1pZWln/NCRRUrpkBgAAsQDrb7DM6CwCAAB1LLDw6BMCAAB1U1g8B7AJcgKwC1CLdfwrddw7dSQPgs8BAACsi338qumOAQAAsNjo9wEAAIt12HQbsOTo6wEAAIt11HQJi3XQi03UiU3Qi03YiU3Ui03ciU3YiXXcWF9ZumgKAACxCAH6Ulc8B4jIcgIEA1CLbczovAEAAHUUi0Xoi33MweADKclqCF6NfEcE6zWLbcyDxQLomwEAAHUYi0Xoi33MweADaghZaghejbxHBAEAAOsQvwQCAAADfcxqEFm+AAEAAIlN5CnAQIn96GYBAACJwSnxcvMBTeSDfcQED4OwAAAAg0XEB4tN5IP5BHIDagNZi33IweEGKcBAakBejbxPYAMAAIn96CoBAACJwSnxcvOJTeiJTdyD+QRyc4nOg2XcAdHug03cAk6D+Q5zGbivAgAAKciJ8dJl3ANF3NHgA0XIiUXM6y2D7gToowAAANHr0WXcOV3gcgb/RdwpXeBOdei4RAYAAANFyIlFzMFl3ARqBF4p/0eJ+IttzOi0AAAAqAF0Awl93NHnTnXs6wD/RdyLTeSDwQKLffyJ+CtFJDlF3HdIif4rddyLVSisqjnXcwNJdfeJffwPtvA7fSgPgnH9///oKAAAACnAjWwkPItVIIt1+Ct1GIkyi1Usi338K30kiTrJW15fw15YKcBA69qB+wAAAAFyAcPB4whWi3X4O3Ucc+SLReDB4AisiUXgiXX4XsOLTcQPtsDB4QQDRegByOsGD7bAA0XEi23IjWxFACnAjWxFAIH7AAAAAXMci0wkOMFkJCAIO0wkXHOcihH/RCQ4weMIiFQkIInZD7dVAMHpCw+vyjlMJCBzF4nLuQAIAAAp0cHpBWYBTQABwI1sJEDDweoFKUwkICnLZilVAAHAg8ABjWwkQMO4///////gbXN2Y3J0LmRsbHxtYWxsb2MAuP//////4GZyZWUA'))
137 | EndIf
138 | If Not $CodeBase Then Return SetError(1, 0, Binary(""))
139 | EndIf
140 |
141 | $Src = Binary($Src)
142 | Local $SrcLen = BinaryLen($Src)
143 | Local $SrcBuf = DllStructCreate("byte[" & $SrcLen & "]")
144 | DllStructSetData($SrcBuf, 1, $Src)
145 |
146 | Local $Ret = DllCallAddress("ptr:cdecl", $CodeBase, "ptr", DllStructGetPtr($SrcBuf), "uint_ptr", $SrcLen, "uint_ptr*", 0, "uint*", 0)
147 | If $Ret[0] Then
148 | Local $DstBuf = DllStructCreate("byte[" & $Ret[3] & "]", $Ret[0])
149 | Local $Output = DllStructGetData($DstBuf, 1)
150 | DllCall($__BinaryCall_Msvcrtdll, "none:cdecl", "free", "ptr", $Ret[0])
151 |
152 | Return $Output
153 | EndIf
154 | Return SetError(2, 0, Binary(""))
155 | EndFunc
156 |
157 | Func _BinaryCall_Relocation($Base, $Reloc)
158 | Local $Size = Int(BinaryMid($Reloc, 1, 2))
159 |
160 | For $i = 3 To BinaryLen($Reloc) Step $Size
161 | Local $Offset = Int(BinaryMid($Reloc, $i, $Size))
162 | Local $Ptr = $Base + $Offset
163 | DllStructSetData(DllStructCreate("ptr", $Ptr), 1, DllStructGetData(DllStructCreate("ptr", $Ptr), 1) + $Base)
164 | Next
165 | EndFunc
166 |
167 | Func _BinaryCall_ImportLibrary($Base, $Length)
168 | Local $JmpBin, $JmpOff, $JmpLen, $DllName, $ProcName
169 | If @AutoItX64 Then
170 | $JmpBin = Binary("0x48B8FFFFFFFFFFFFFFFFFFE0")
171 | $JmpOff = 2
172 | Else
173 | $JmpBin = Binary("0xB8FFFFFFFFFFE0")
174 | $JmpOff = 1
175 | EndIf
176 | $JmpLen = BinaryLen($JmpBin)
177 |
178 | Do
179 | Local $Ptr = _BinaryCall_MemorySearch($Base, $Length, $JmpBin)
180 | If $Ptr = 0 Then ExitLoop
181 |
182 | Local $StringPtr = $Ptr + $JmpLen
183 | Local $StringLen = _BinaryCall_lstrlenA($StringPtr)
184 | Local $String = DllStructGetData(DllStructCreate("char[" & $StringLen & "]", $StringPtr), 1)
185 | Local $Split = StringSplit($String, "|")
186 |
187 | If $Split[0] = 1 Then
188 | $ProcName = $Split[1]
189 | ElseIf $Split[0] = 2 Then
190 | If $Split[1] Then $DllName = $Split[1]
191 | $ProcName = $Split[2]
192 | EndIf
193 |
194 | If $DllName And $ProcName Then
195 | Local $Handle = _BinaryCall_LoadLibrary($DllName)
196 | If Not $Handle Then
197 | $__BinaryCall_LastError = "LoadLibrary fail on " & $DllName
198 | Return SetError(1, 0, False)
199 | EndIf
200 |
201 | Local $Proc = _BinaryCall_GetProcAddress($Handle, $ProcName)
202 | If Not $Proc Then
203 | $__BinaryCall_LastError = "GetProcAddress failed on " & $ProcName
204 | Return SetError(2, 0, False)
205 | EndIf
206 |
207 | DllStructSetData(DllStructCreate("ptr", $Ptr + $JmpOff), 1, $Proc)
208 | EndIf
209 |
210 | Local $Diff = Int($Ptr - $Base + $JmpLen + $StringLen + 1)
211 | $Base += $Diff
212 | $Length -= $Diff
213 |
214 | Until $Length <= $JmpLen
215 | Return True
216 | EndFunc
217 |
218 | Func _BinaryCall_CodePrepare($Code)
219 | If Not $Code Then Return ""
220 | If IsBinary($Code) Then Return $Code
221 |
222 | $Code = String($Code)
223 | If StringLeft($Code, 2) = "0x" Then Return Binary($Code)
224 | If StringIsXDigit($Code) Then Return Binary("0x" & $Code)
225 |
226 | Return _BinaryCall_LzmaDecompress(_BinaryCall_Base64Decode($Code))
227 | EndFunc
228 |
229 | Func _BinaryCall_SymbolFind($CodeBase, $Identify, $Length = Default)
230 | $Identify = Binary($Identify)
231 |
232 | If IsKeyword($Length) Then
233 | $Length = _BinaryCall_RegionSize($CodeBase)
234 | EndIf
235 |
236 | Local $Ptr = _BinaryCall_MemorySearch($CodeBase, $Length, $Identify)
237 | If $Ptr = 0 Then Return SetError(1, 0, 0)
238 |
239 | Return $Ptr + BinaryLen($Identify)
240 | EndFunc
241 |
242 | Func _BinaryCall_SymbolList($CodeBase, $Symbol)
243 | If Not IsArray($Symbol) Or $CodeBase = 0 Then Return SetError(1, 0, 0)
244 |
245 | Local $Tag = ""
246 | For $i = 0 To UBound($Symbol) - 1
247 | $Tag &= "ptr " & $Symbol[$i] & ";"
248 | Next
249 |
250 | Local $SymbolList = DllStructCreate($Tag)
251 | If @Error Then Return SetError(1, 0, 0)
252 |
253 | For $i = 0 To UBound($Symbol) - 1
254 | $CodeBase = _BinaryCall_SymbolFind($CodeBase, $Symbol[$i])
255 | DllStructSetData($SymbolList, $Symbol[$i], $CodeBase)
256 | Next
257 | Return $SymbolList
258 | EndFunc
259 |
260 | Func _BinaryCall_Create($Code, $Reloc = '', $Padding = 0, $ReleaseOnExit = True, $LibraryImport = True)
261 | Local $BinaryCode = _BinaryCall_CodePrepare($Code)
262 | If Not $BinaryCode Then Return SetError(1, 0, 0)
263 |
264 | Local $BinaryCodeLen = BinaryLen($BinaryCode)
265 | Local $TotalCodeLen = $BinaryCodeLen + $Padding
266 |
267 | Local $CodeBase = _BinaryCall_Alloc($BinaryCode, $Padding)
268 | If Not $CodeBase Then Return SetError(2, 0, 0)
269 |
270 | If $Reloc Then
271 | $Reloc = _BinaryCall_CodePrepare($Reloc)
272 | If Not $Reloc Then Return SetError(3, 0, 0)
273 | _BinaryCall_Relocation($CodeBase, $Reloc)
274 | EndIf
275 |
276 | If $LibraryImport Then
277 | If Not _BinaryCall_ImportLibrary($CodeBase, $BinaryCodeLen) Then
278 | _BinaryCall_Free($CodeBase)
279 | Return SetError(4, 0, 0)
280 | EndIf
281 | EndIf
282 |
283 | If $ReleaseOnExit Then
284 | _BinaryCall_ReleaseOnExit($CodeBase)
285 | EndIf
286 |
287 | Return SetError(0, $TotalCodeLen, $CodeBase)
288 | EndFunc
289 |
290 | Func _BinaryCall_CommandLineToArgv($CommandLine, ByRef $Argc, $IsUnicode = False)
291 | Static $SymbolList
292 | If Not IsDllStruct($SymbolList) Then
293 | Local $Code
294 | If @AutoItX64 Then
295 | $Code = 'AwAAAASuAgAAAAAAAAAkL48ClEB9jTEOeYv4yYTosNjFNgf81Ag4vS2VP4y4wxFa+4yMI7GDB7CG+xn4JE3cdEVvk8cMp4oIuS3DgTxlcKHGVIg94tvzG/256bizZfGtAETQUCPQjW5+JSx2C/Y4C0VNJMKTlSCHiV5AzXRZ5gw3WFghbtkCCFxWOX+RDSI2oH/vROEOnqc0jfKTo17EBjqX+dW3QxrUe45xsbyYTZ9ccIGySgcOAxetbRiSxQnz8BOMbJyfrbZbuVJyGpKrXFLh/5MlBZ09Cim9qgflbGzmkrGStT9QL1f+O2krzyOzgaWWqhWL6S+y0G32RWVi0uMLR/JOGLEW/+Yg/4bzkeC0lKELT+RmWAatNa38BRfaitROMN12moRDHM6LYD1lzPLnaiefSQRVti561sxni/AFkYoCb5Lkuyw4RIn/r/flRiUg5w48YkqBBd9rXkaXrEoKwPg6rmOvOCZadu//B6HN4+Ipq5aYNuZMxSJXmxwXVRSQZVpSfLS2ATZMd9/Y7kLqrKy1H4V76SgI/d9OKApfKSbQ8ZaKIHBCsoluEip3UDOB82Z21zd933UH5l0laGWLIrTz7xVGkecjo0NQzR7LyhhoV3xszlIuw2v8q0Q/S9LxB5G6tYbOXo7lLjNIZc0derZz7DNeeeJ9dQE9hp8unubaTBpulPxTNtRjog=='
296 | Else
297 | $Code = 'AwAAAAR6AgAAAAAAAABcQfD553vjya/3DmalU0BKqABevUb/60GZ55rMwmzpQfPSRUlIl04lEiS8RDrXpS0EoBUe+uzDgZd37nVu9wsJ4fykqYvLoMz3ApxQbTBKleOIRSla6I0V8dNP3P7rHeUfjH0jCho0RvhhVpf0o4ht/iZptauxaoy1zQ19TkPZ/vf5Im8ecY6qEdHNzjo2H60jVwiOJ+1J47TmQRwxJ+yKLakq8QNxtKkRIB9B9ugfo3NAL0QslDxbyU0dSgw2aOPxV+uttLzYNnWbLBZVQbchcKgLRjC/32U3Op576sOYFolB1Nj4/33c7MRgtGLjlZfTB/4yNvd4/E+u3U6/Q4MYApCfWF4R/d9CAdiwgIjCYUkGDExKjFtHbAWXfWh9kQ7Q/GWUjsfF9BtHO6924Cy1Ou+BUKksqsxmIKP4dBjvvmz9OHc1FdtR9I63XKyYtlUnqVRtKwlNrYAZVCSFsyAefMbteq1ihU33sCsLkAnp1LRZ2wofgT1/JtT8+GO2s/n52D18wM70RH2n5uJJv8tlxQc1lwbmo4XQvcbcE91U2j9glvt2wC1pkP0hF23Nr/iiIEZHIPAOAHvhervlHE830LSHyUx8yh5Tjojr0gdLvQ=='
298 | EndIf
299 | Local $CodeBase = _BinaryCall_Create($Code)
300 | If @Error Then Return SetError(1, 0, 0)
301 |
302 | Local $Symbol[] = ["ToArgvW","ToArgvA"]
303 | $SymbolList = _BinaryCall_SymbolList($CodeBase, $Symbol)
304 | If @Error Then Return SetError(1, 0, 0)
305 | EndIf
306 |
307 | Local $Ret
308 | If $IsUnicode Then
309 | $Ret = DllCallAddress("ptr:cdecl", DllStructGetData($SymbolList, "ToArgvW"), "wstr", $CommandLine, "int*", 0)
310 | Else
311 | $Ret = DllCallAddress("ptr:cdecl", DllStructGetData($SymbolList, "ToArgvA"), "str", $CommandLine, "int*", 0)
312 | EndIf
313 |
314 | If Not @Error And $Ret[0] <> 0 Then
315 | _BinaryCall_ReleaseOnExit($Ret[0])
316 | $Argc = $Ret[2]
317 | Return $Ret[0]
318 | Else
319 | Return SetError(2, 0, 0)
320 | EndIf
321 | EndFunc
322 |
323 | Func _BinaryCall_StdioRedirect($Filename = "CON", $Flag = 1 + 2 + 4)
324 | Static $SymbolList
325 | If Not IsDllStruct($SymbolList) Then
326 | Local $Code, $Reloc
327 | If @AutoItX64 Then
328 | $Code = 'AwAAAASjAQAAAAAAAAAkL48ClEB9jTEOeYv4yYTosNjFM1rLNdMULriZUDxTj+ZdkQ01F5zKL+WDCScfQKKLn66EDmcA+gXIkPcZV4lyz8VPw8BPZlNB5KymydM15kCA+uqvmBc1V0NJfzgsF0Amhn0JhM/ZIguYCHxywMQ1SgKxUb05dxDg8WlX/2aPfSolcX47+4/72lPDNTeT7d7XRdm0ND+eCauuQcRH2YOahare9ASxuU4IMHCh2rbZYHwmTNRiQUB/8dLGtph93yhmwdHtyMPLX2x5n6sdA1mxua9htLsLTulE05LLmXbRYXylDz0A'
329 | $Reloc = 'AwAAAAQIAAAAAAAAAAABAB7T+CzGn9ScQAC='
330 | Else
331 | $Code = 'AwAAAASVAQAAAAAAAABcQfD553vjya/3DmalU0BKqABaUcndypZ3mTYUkHxlLV/lKZPrXYWXgNATjyiowkUQGDVYUy5THQwK4zYdU7xuGf7qfVDELc1SNbiW3NgD4D6N6ZM7auI1jPaThsPfA/ouBcx2aVQX36fjmViTZ8ZLzafjJeR7d5OG5s9sAoIzFLTZsqrFlkIJedqDAOfhA/0mMrkavTWnsio6yTbic1dER0DcEsXpLn0vBNErKHoagLzAgofHNLeFRw5yHWz5owR5CYL7rgiv2k51neHBWGx97A=='
332 | $Reloc = 'AwAAAAQgAAAAAAAAAAABABfyHS/VRkdjBBzbtGPD6vtmVH/IsGHYvPsTv2lGuqJxGlAA'
333 | EndIf
334 |
335 | Local $CodeBase = _BinaryCall_Create($Code, $Reloc)
336 | If @Error Then Return SetError(1, 0, 0)
337 |
338 | Local $Symbol[] = ["StdinRedirect","StdoutRedirect","StderrRedirect"]
339 | $SymbolList = _BinaryCall_SymbolList($CodeBase, $Symbol)
340 | If @Error Then Return SetError(1, 0, 0)
341 | EndIf
342 |
343 | If BitAND($Flag, 1) Then DllCallAddress("none:cdecl", DllStructGetData($SymbolList, "StdinRedirect"), "str", $Filename)
344 | If BitAND($Flag, 2) Then DllCallAddress("none:cdecl", DllStructGetData($SymbolList, "StdoutRedirect"), "str", $Filename)
345 | If BitAND($Flag, 4) Then DllCallAddress("none:cdecl", DllStructGetData($SymbolList, "StderrRedirect"), "str", $Filename)
346 | EndFunc
347 |
348 | Func _BinaryCall_StdinRedirect($Filename = "CON")
349 | Local $Ret = _BinaryCall_StdioRedirect($Filename, 1)
350 | Return SetError(@Error, @Extended, $Ret)
351 | EndFunc
352 |
353 | Func _BinaryCall_StdoutRedirect($Filename = "CON")
354 | Local $Ret = _BinaryCall_StdioRedirect($Filename, 2)
355 | Return SetError(@Error, @Extended, $Ret)
356 | EndFunc
357 |
358 | Func _BinaryCall_StderrRedirect($Filename = "CON")
359 | Local $Ret = _BinaryCall_StdioRedirect($Filename, 4)
360 | Return SetError(@Error, @Extended, $Ret)
361 | EndFunc
362 |
363 | Func _BinaryCall_ReleaseOnExit($Ptr)
364 | OnAutoItExitRegister('__BinaryCall_DoRelease')
365 | __BinaryCall_ReleaseOnExit_Handle($Ptr)
366 | EndFunc
367 |
368 | Func __BinaryCall_DoRelease()
369 | __BinaryCall_ReleaseOnExit_Handle()
370 | EndFunc
371 |
372 | Func __BinaryCall_ReleaseOnExit_Handle($Ptr = Default)
373 | Static $PtrList
374 |
375 | If @NumParams = 0 Then
376 | If IsArray($PtrList) Then
377 | For $i = 1 To $PtrList[0]
378 | _BinaryCall_Free($PtrList[$i])
379 | Next
380 | EndIf
381 | Else
382 | If Not IsArray($PtrList) Then
383 | Local $InitArray[1] = [0]
384 | $PtrList = $InitArray
385 | EndIf
386 |
387 | If IsPtr($Ptr) Then
388 | Local $Array = $PtrList
389 | Local $Size = UBound($Array)
390 | ReDim $Array[$Size + 1]
391 | $Array[$Size] = $Ptr
392 | $Array[0] += 1
393 | $PtrList = $Array
394 | EndIf
395 | EndIf
396 | EndFunc
397 |
--------------------------------------------------------------------------------
/libraries/StringSize.au3:
--------------------------------------------------------------------------------
1 | #include-once
2 |
3 | ; #INDEX# ============================================================================================================
4 | ; Title .........: _StringSize
5 | ; AutoIt Version : v3.2.12.1 or higher
6 | ; Language ......: English
7 | ; Description ...: Returns size of rectangle required to display string - maximum width can be chosen
8 | ; Remarks .......:
9 | ; Note ..........:
10 | ; Author(s) .....: Melba23 - thanks to trancexx for the default DC code
11 | ; ====================================================================================================================
12 |
13 | ;#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
14 |
15 | ; #CURRENT# ==========================================================================================================
16 | ; _StringSize: Returns size of rectangle required to display string - maximum width can be chosen
17 | ; ====================================================================================================================
18 |
19 | ; #INTERNAL_USE_ONLY#=================================================================================================
20 | ; _StringSize_Error_Close: Releases DC and deletes font object after error
21 | ; _StringSize_DefaultFontName: Determines Windows default font
22 | ; ====================================================================================================================
23 |
24 | ; #FUNCTION# =========================================================================================================
25 | ; Name...........: _StringSize
26 | ; Description ...: Returns size of rectangle required to display string - maximum permitted width can be chosen
27 | ; Syntax ........: _StringSize($sText[, $iSize[, $iWeight[, $iAttrib[, $sName[, $iWidth[, $hWnd]]]]]])
28 | ; Parameters ....: $sText - String to display
29 | ; $iSize - [optional] Font size in points - (default = 8.5)
30 | ; $iWeight - [optional] Font weight - (default = 400 = normal)
31 | ; $iAttrib - [optional] Font attribute (0-Normal (default), 2-Italic, 4-Underline, 8 Strike)
32 | ; + 1 if tabs are to be expanded before sizing
33 | ; $sName - [optional] Font name - (default = Tahoma)
34 | ; $iWidth - [optional] Max width for rectangle - (default = 0 => width of original string)
35 | ; $hWnd - [optional] GUI in which string will be displayed - (default 0 => normally not required)
36 | ; Requirement(s) : v3.2.12.1 or higher
37 | ; Return values .: Success - Returns 4-element array: ($iWidth set // $iWidth not set)
38 | ; |$array[0] = String reformatted with additonal @CRLF // Original string
39 | ; |$array[1] = Height of single line in selected font // idem
40 | ; |$array[2] = Width of rectangle required for reformatted // original string
41 | ; |$array[3] = Height of rectangle required for reformatted // original string
42 | ; Failure - Returns 0 and sets @error:
43 | ; |1 - Incorrect parameter type (@extended = parameter index)
44 | ; |2 - DLL call error - extended set as follows:
45 | ; |1 - GetDC failure
46 | ; |2 - SendMessage failure
47 | ; |3 - GetDeviceCaps failure
48 | ; |4 - CreateFont failure
49 | ; |5 - SelectObject failure
50 | ; |6 - GetTextExtentPoint32 failure
51 | ; |3 - Font too large for chosen max width - a word will not fit
52 | ; Author ........: Melba23 - thanks to trancexx for the default DC code
53 | ; Modified ......:
54 | ; Remarks .......: The use of the $hWnd parameter is not normally necessary - it is only required if the UDF does not
55 | ; return correct dimensions without it.
56 | ; Related .......:
57 | ; Link ..........:
58 | ; Example .......: Yes
59 | ;=====================================================================================================================
60 | Func _StringSize($sText, $iSize = 8.5, $iWeight = 400, $iAttrib = 0, $sName = "", $iMaxWidth = 0, $hWnd = 0)
61 |
62 | ; Set parameters passed as Default
63 | If $iSize = Default Then $iSize = 8.5
64 | If $iWeight = Default Then $iWeight = 400
65 | If $iAttrib = Default Then $iAttrib = 0
66 | If $sName = "" Or $sName = Default Then $sName = _StringSize_DefaultFontName()
67 |
68 | ; Check parameters are correct type
69 | If Not IsString($sText) Then Return SetError(1, 1, 0)
70 | If Not IsNumber($iSize) Then Return SetError(1, 2, 0)
71 | If Not IsInt($iWeight) Then Return SetError(1, 3, 0)
72 | If Not IsInt($iAttrib) Then Return SetError(1, 4, 0)
73 | If Not IsString($sName) Then Return SetError(1, 5, 0)
74 | If Not IsNumber($iMaxWidth) Then Return SetError(1, 6, 0)
75 | If Not IsHwnd($hWnd) And $hWnd <> 0 Then Return SetError(1, 7, 0)
76 |
77 | Local $aRet, $hDC, $hFont, $hLabel = 0, $hLabel_Handle
78 |
79 | ; Check for tab expansion flag
80 | Local $iExpTab = BitAnd($iAttrib, 1)
81 | ; Remove possible tab expansion flag from font attribute value
82 | $iAttrib = BitAnd($iAttrib, BitNot(1))
83 |
84 | ; If GUI handle was passed
85 | If IsHWnd($hWnd) Then
86 | ; Create label outside GUI borders
87 | $hLabel = GUICtrlCreateLabel("", -10, -10, 10, 10)
88 | $hLabel_Handle = GUICtrlGetHandle(-1)
89 | GUICtrlSetFont(-1, $iSize, $iWeight, $iAttrib, $sName)
90 | ; Create DC
91 | $aRet = DllCall("user32.dll", "handle", "GetDC", "hwnd", $hLabel_Handle)
92 | If @error Or $aRet[0] = 0 Then
93 | GUICtrlDelete($hLabel)
94 | Return SetError(2, 1, 0)
95 | EndIf
96 | $hDC = $aRet[0]
97 | $aRet = DllCall("user32.dll", "lparam", "SendMessage", "hwnd", $hLabel_Handle, "int", 0x0031, "wparam", 0, "lparam", 0) ; $WM_GetFont
98 | If @error Or $aRet[0] = 0 Then
99 | GUICtrlDelete($hLabel)
100 | Return SetError(2, _StringSize_Error_Close(2, $hDC), 0)
101 | EndIf
102 | $hFont = $aRet[0]
103 | Else
104 | ; Get default DC
105 | $aRet = DllCall("user32.dll", "handle", "GetDC", "hwnd", $hWnd)
106 | If @error Or $aRet[0] = 0 Then Return SetError(2, 1, 0)
107 | $hDC = $aRet[0]
108 | ; Create required font
109 | $aRet = DllCall("gdi32.dll", "int", "GetDeviceCaps", "handle", $hDC, "int", 90) ; $LOGPIXELSY
110 | If @error Or $aRet[0] = 0 Then Return SetError(2, _StringSize_Error_Close(3, $hDC), 0)
111 | Local $iInfo = $aRet[0]
112 | $aRet = DllCall("gdi32.dll", "handle", "CreateFontW", "int", -$iInfo * $iSize / 72, "int", 0, "int", 0, "int", 0, _
113 | "int", $iWeight, "dword", BitAND($iAttrib, 2), "dword", BitAND($iAttrib, 4), "dword", BitAND($iAttrib, 8), "dword", 0, "dword", 0, _
114 | "dword", 0, "dword", 5, "dword", 0, "wstr", $sName)
115 | If @error Or $aRet[0] = 0 Then Return SetError(2, _StringSize_Error_Close(4, $hDC), 0)
116 | $hFont = $aRet[0]
117 | EndIf
118 |
119 | ; Select font and store previous font
120 | $aRet = DllCall("gdi32.dll", "handle", "SelectObject", "handle", $hDC, "handle", $hFont)
121 | If @error Or $aRet[0] = 0 Then Return SetError(2, _StringSize_Error_Close(5, $hDC, $hFont, $hLabel), 0)
122 | Local $hPrevFont = $aRet[0]
123 |
124 | ; Declare variables
125 | Local $avSize_Info[4], $iLine_Length, $iLine_Height = 0, $iLine_Count = 0, $iLine_Width = 0, $iWrap_Count, $iLast_Word, $sTest_Line
126 | ; Declare and fill Size structure
127 | Local $tSize = DllStructCreate("int X;int Y")
128 | DllStructSetData($tSize, "X", 0)
129 | DllStructSetData($tSize, "Y", 0)
130 |
131 | ; Ensure EoL is @CRLF and break text into lines
132 | $sText = StringRegExpReplace($sText, "((? $iLine_Width Then $iLine_Width = DllStructGetData($tSize, "X")
146 | If DllStructGetData($tSize, "Y") > $iLine_Height Then $iLine_Height = DllStructGetData($tSize, "Y")
147 | Next
148 |
149 | ; Check if $iMaxWidth has been both set and exceeded
150 | If $iMaxWidth <> 0 And $iLine_Width > $iMaxWidth Then ; Wrapping required
151 | ; For each Line
152 | For $j = 1 To $asLines[0]
153 | ; Size line unwrapped
154 | $iLine_Length = StringLen($asLines[$j])
155 | DllCall("gdi32.dll", "bool", "GetTextExtentPoint32W", "handle", $hDC, "wstr", $asLines[$j], "int", $iLine_Length, "ptr", DllStructGetPtr($tSize))
156 | If @error Then Return SetError(2, _StringSize_Error_Close(6, $hDC, $hFont, $hLabel), 0)
157 | ; Check wrap status
158 | If DllStructGetData($tSize, "X") < $iMaxWidth - 4 Then
159 | ; No wrap needed so count line and store
160 | $iLine_Count += 1
161 | $avSize_Info[0] &= $asLines[$j] & @CRLF
162 | Else
163 | ; Wrap needed so zero counter for wrapped lines
164 | $iWrap_Count = 0
165 | ; Build line to max width
166 | While 1
167 | ; Zero line width
168 | $iLine_Width = 0
169 | ; Initialise pointer for end of word
170 | $iLast_Word = 0
171 | ; Add characters until EOL or maximum width reached
172 | For $i = 1 To StringLen($asLines[$j])
173 | ; Is this just past a word ending?
174 | If StringMid($asLines[$j], $i, 1) = " " Then $iLast_Word = $i - 1
175 | ; Increase line by one character
176 | $sTest_Line = StringMid($asLines[$j], 1, $i)
177 | ; Get line length
178 | $iLine_Length = StringLen($sTest_Line)
179 | DllCall("gdi32.dll", "bool", "GetTextExtentPoint32W", "handle", $hDC, "wstr", $sTest_Line, "int", $iLine_Length, "ptr", DllStructGetPtr($tSize))
180 | If @error Then Return SetError(2, _StringSize_Error_Close(6, $hDC, $hFont, $hLabel), 0)
181 | $iLine_Width = DllStructGetData($tSize, "X")
182 | ; If too long exit the loop
183 | If $iLine_Width >= $iMaxWidth - 4 Then ExitLoop
184 | Next
185 | ; End of the line of text?
186 | If $i > StringLen($asLines[$j]) Then
187 | ; Yes, so add final line to count
188 | $iWrap_Count += 1
189 | ; Store line
190 | $avSize_Info[0] &= $sTest_Line & @CRLF
191 | ExitLoop
192 | Else
193 | ; No, but add line just completed to count
194 | $iWrap_Count += 1
195 | ; Check at least 1 word completed or return error
196 | If $iLast_Word = 0 Then Return SetError(3, _StringSize_Error_Close(0, $hDC, $hFont, $hLabel), 0)
197 | ; Store line up to end of last word
198 | $avSize_Info[0] &= StringLeft($sTest_Line, $iLast_Word) & @CRLF
199 | ; Strip string to point reached
200 | $asLines[$j] = StringTrimLeft($asLines[$j], $iLast_Word)
201 | ; Trim leading whitespace
202 | $asLines[$j] = StringStripWS($asLines[$j], 1)
203 | ; Repeat with remaining characters in line
204 | EndIf
205 | WEnd
206 | ; Add the number of wrapped lines to the count
207 | $iLine_Count += $iWrap_Count
208 | EndIf
209 | Next
210 | ; Reset any tab expansions
211 | If $iExpTab Then
212 | $avSize_Info[0] = StringRegExpReplace($avSize_Info[0], "\x20?XXXXXXXX", @TAB)
213 | EndIf
214 | ; Complete return array
215 | $avSize_Info[1] = $iLine_Height
216 | $avSize_Info[2] = $iMaxWidth
217 | ; Convert lines to pixels and add drop margin
218 | $avSize_Info[3] = ($iLine_Count * $iLine_Height) + 4
219 | Else ; No wrapping required
220 | ; Create return array (add drop margin to height)
221 | Local $avSize_Info[4] = [$sText, $iLine_Height, $iLine_Width, ($asLines[0] * $iLine_Height) + 4]
222 | EndIf
223 |
224 | ; Clear up
225 | DllCall("gdi32.dll", "handle", "SelectObject", "handle", $hDC, "handle", $hPrevFont)
226 | DllCall("gdi32.dll", "bool", "DeleteObject", "handle", $hFont)
227 | DllCall("user32.dll", "int", "ReleaseDC", "hwnd", 0, "handle", $hDC)
228 | If $hLabel Then GUICtrlDelete($hLabel)
229 |
230 | Return $avSize_Info
231 |
232 | EndFunc ;==>_StringSize
233 |
234 | ; #INTERNAL_USE_ONLY#============================================================================================================
235 | ; Name...........: _StringSize_Error_Close
236 | ; Description ...: Releases DC and deleted font object if required after error
237 | ; Syntax ........: _StringSize_Error_Close ($iExtCode, $hDC, $hGUI)
238 | ; Parameters ....: $iExtCode - code to return
239 | ; $hDC, $hGUI - handles as set in _StringSize function
240 | ; Return value ..: $iExtCode as passed
241 | ; Author ........: Melba23
242 | ; Modified.......:
243 | ; Remarks .......: This function is used internally by _StringSize
244 | ; ===============================================================================================================================
245 | Func _StringSize_Error_Close($iExtCode, $hDC = 0, $hFont = 0, $hLabel = 0)
246 |
247 | If $hFont <> 0 Then DllCall("gdi32.dll", "bool", "DeleteObject", "handle", $hFont)
248 | If $hDC <> 0 Then DllCall("user32.dll", "int", "ReleaseDC", "hwnd", 0, "handle", $hDC)
249 | If $hLabel Then GUICtrlDelete($hLabel)
250 |
251 | Return $iExtCode
252 |
253 | EndFunc ;=>_StringSize_Error_Close
254 |
255 | ; #INTERNAL_USE_ONLY#============================================================================================================
256 | ; Name...........: _StringSize_DefaultFontName
257 | ; Description ...: Determines Windows default font
258 | ; Syntax ........: _StringSize_DefaultFontName()
259 | ; Parameters ....: None
260 | ; Return values .: Success - Returns name of system default font
261 | ; Failure - Returns "Tahoma"
262 | ; Author ........: Melba23, based on some original code by Larrydalooza
263 | ; Modified.......:
264 | ; Remarks .......: This function is used internally by _StringSize
265 | ; ===============================================================================================================================
266 | Func _StringSize_DefaultFontName()
267 |
268 | ; Get default system font data
269 | Local $tNONCLIENTMETRICS = DllStructCreate("uint;int;int;int;int;int;byte[60];int;int;byte[60];int;int;byte[60];byte[60];byte[60]")
270 | DLLStructSetData($tNONCLIENTMETRICS, 1, DllStructGetSize($tNONCLIENTMETRICS))
271 | DLLCall("user32.dll", "int", "SystemParametersInfo", "int", 41, "int", DllStructGetSize($tNONCLIENTMETRICS), "ptr", DllStructGetPtr($tNONCLIENTMETRICS), "int", 0)
272 | Local $tLOGFONT = DllStructCreate("long;long;long;long;long;byte;byte;byte;byte;byte;byte;byte;byte;char[32]", DLLStructGetPtr($tNONCLIENTMETRICS, 13))
273 | If IsString(DllStructGetData($tLOGFONT, 14)) Then
274 | Return DllStructGetData($tLOGFONT, 14)
275 | Else
276 | Return "Tahoma"
277 | EndIf
278 |
279 | EndFunc ;=>_StringSize_DefaultFontName
--------------------------------------------------------------------------------
/libraries/asyncRun.au3:
--------------------------------------------------------------------------------
1 | #include-once
2 | ;==============================================================================
3 | ; Filename: asyncRun.au3
4 | ; Description: Run command 'asynchronously', then execute a callback function.
5 | ; Chain commands to run after the previous command finishes.
6 | ; Author: Kurtis Liggett
7 | ;==============================================================================
8 |
9 | Global $iPID = -1, $pRuntime
10 | Global $pRunning, $pDone, $sStdOut, $sStdErr, $pIdle = 1
11 | Global $pQueue[1][2] = [[0, 0]]
12 |
13 | #include
14 |
15 | Global $__asyncProcess__Data[1][5]
16 | $__asyncProcess__Data[0][0] = -1
17 | $__asyncProcess__Data[0][2] = 1
18 | ;[0][0] = PID
19 | ;[0][1] = PID runtime
20 | ;[0][2] = idle status
21 | ;[0][3] = timeout countdown
22 | ;
23 | ;[1][0] = command 1 command
24 | ;[1][1] = command 1 callback function
25 | ;[1][2] = command 1 description
26 | ;[1][3] = command 1 timeout
27 | ; ...
28 | ;[n][0] = command n command
29 | ;[n][1] = command n callback function
30 | ;[n][2] = command n description
31 | ;[n][3] = command n timeout
32 |
33 | Func asyncRun($sCmd, $CallbackFunc, $sDescription = "", $iTimeout = 10000)
34 | _ArrayAdd($__asyncProcess__Data, $sCmd)
35 | Local $size = UBound($__asyncProcess__Data)
36 | $__asyncProcess__Data[$size - 1][1] = $CallbackFunc
37 | $__asyncProcess__Data[$size - 1][2] = $sDescription
38 | $__asyncProcess__Data[$size - 1][3] = $iTimeout
39 | $__asyncProcess__Data[0][2] = 0
40 | If $size = 2 Then
41 | $sStdOut = ""
42 | _setStatus("")
43 | $CallbackFunc($sDescription, $sDescription, "")
44 | EndIf
45 | AdlibRegister("_asyncRun_Process", 100)
46 | EndFunc ;==>asyncRun
47 |
48 | Func _asyncRun_Execute($sCmd)
49 |
50 | EndFunc ;==>_asyncRun_Execute
51 |
52 | Func _asyncRun_Clear()
53 | For $i = 1 To UBound($__asyncProcess__Data) - 1
54 | _ArrayDelete($__asyncProcess__Data, 1)
55 | Next
56 | EndFunc ;==>_asyncRun_Clear
57 |
58 | Func _asyncRun_Process()
59 | Local $endingString = "__asyncRun cmd done"
60 |
61 | Local $pExists = ProcessExists($__asyncProcess__Data[0][0])
62 | If $pExists Then ;if process exists, check if finished
63 | Local $pDone
64 |
65 | $sStdOut = $sStdOut & StdoutRead($__asyncProcess__Data[0][0])
66 | $sStdErr = $sStdErr & StderrRead($__asyncProcess__Data[0][0])
67 |
68 | If StringInStr($sStdOut, $endingString) Then ;look for our unique phrase to signal we're done
69 | $sStdOut = StringLeft($sStdOut, StringInStr($sStdOut, $endingString) - 1)
70 | $pDone = 1
71 | ElseIf TimerDiff($__asyncProcess__Data[0][1]) > $__asyncProcess__Data[1][3] Then ;if timeout expired
72 | $sStdOut = "Command timeout"
73 | $pDone = 1
74 | Else
75 | Local $countdown = 10 - Round(TimerDiff($pRuntime) / 1000)
76 | If $countdown <= 5 Then
77 | $__asyncProcess__Data[0][3] = $countdown
78 | EndIf
79 | EndIf
80 |
81 | If $pDone Then
82 | Local $desc = $__asyncProcess__Data[1][2]
83 | Local $nextdesc = ""
84 | If UBound($__asyncProcess__Data) = 2 Then ;this is the last command
85 | $__asyncProcess__Data[0][2] = 1
86 | Else
87 | $nextdesc = $__asyncProcess__Data[2][2]
88 | EndIf
89 | ProcessClose($__asyncProcess__Data[0][0])
90 | $__asyncProcess__Data[0][0] = -1
91 | AdlibUnRegister("_asyncRun_Process")
92 | ;Call($__asyncProcess__Data[1][1], $__asyncProcess__Data[1][2], $sStdOut) ;callback function
93 | Local $myFunc = $__asyncProcess__Data[1][1]
94 | $myFunc($desc, $nextdesc, $sStdOut) ;callback function
95 | _ArrayDelete($__asyncProcess__Data, 1)
96 | AdlibRegister("_asyncRun_Process", 100)
97 | EndIf
98 | ElseIf UBound($__asyncProcess__Data) > 1 Then ;if process is finished, start next command
99 | ;Run command and end with a unique string so we know the command is finished
100 | $__asyncProcess__Data[0][0] = Run(@ComSpec & " /k " & $__asyncProcess__Data[1][0] & "& echo __asyncRun cmd done", "", @SW_HIDE, $STDIN_CHILD + $STDERR_MERGED)
101 | $__asyncProcess__Data[0][1] = TimerInit() ;start runtime timer
102 | $__asyncProcess__Data[0][2] = 0 ;set Idle status to 0
103 | Else ;done processing, no commands left
104 | $__asyncProcess__Data[0][2] = 1 ;idle status to 1
105 | AdlibUnRegister("_asyncRun_Process") ;only run when necessary
106 | EndIf
107 | EndFunc ;==>_asyncRun_Process
108 |
109 | Func asyncRun_isIdle()
110 | Return $__asyncProcess__Data[0][2]
111 | EndFunc ;==>asyncRun_isIdle
112 |
113 | Func asyncRun_getNextDescription()
114 |
115 | EndFunc ;==>asyncRun_getNextDescription
116 |
117 | Func asyncRun_getCountdown()
118 | Return $__asyncProcess__Data[0][3]
119 | EndFunc ;==>asyncRun_getCountdown
120 |
--------------------------------------------------------------------------------
/libraries/oLinkedList.au3:
--------------------------------------------------------------------------------
1 | #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
2 |
3 | ; special thanks to wraithdu for his contribution
4 |
5 | Func __Element__($data, $nextEl = 0)
6 | Local $oClassObj = _AutoItObject_Class()
7 | $oClassObj.AddProperty("next", $ELSCOPE_PUBLIC, 0)
8 | $oClassObj.AddProperty("data", $ELSCOPE_PUBLIC, 0)
9 | Local $oObj = $oClassObj.Object
10 | $oObj.next = $nextEl
11 | $oObj.data = $data
12 | Return $oObj
13 | EndFunc ;==>__Element__
14 |
15 | Func LinkedList()
16 | Local $oClassObj = _AutoItObject_Class()
17 | ; Properties
18 | $oClassObj.AddProperty("first", $ELSCOPE_PUBLIC, 0)
19 | $oClassObj.AddProperty("last", $ELSCOPE_PUBLIC, 0)
20 | $oClassObj.AddProperty("size", $ELSCOPE_PUBLIC, 0)
21 | ; Methods
22 | $oClassObj.AddMethod("count", "_LinkedList_count")
23 | $oClassObj.AddMethod("add", "_LinkedList_add")
24 | $oClassObj.AddMethod("at", "_LinkedList_at")
25 | $oClassObj.AddMethod("remove", "_LinkedList_remove")
26 | ; Enum
27 | $oClassObj.AddEnum("_LinkedList_Enumnext", "_LinkedList_EnumReset")
28 | ; Return created object
29 | Return $oClassObj.Object
30 | EndFunc ;==>LinkedList
31 |
32 | Func _LinkedList_remove($self, $index)
33 | If $self.size = 0 Then Return SetError(1, 0, 0)
34 | Local $current = $self.first
35 | Local $previous = 0
36 | Local $i = 0
37 | Do
38 | If $i = $index Then
39 | If $self.size = 1 Then
40 | ; very last element
41 | $self.first = 0
42 | $self.last = 0
43 | ElseIf $i = 0 Then
44 | ; first element
45 | $self.first = $current.next
46 | Else
47 | If $i = $self.size - 1 Then $self.last = $previous ; last element
48 | $previous.next = $current.next
49 | EndIf
50 | $self.size = $self.size - 1
51 | Return
52 | EndIf
53 | $i += 1
54 | $previous = $current
55 | $current = $current.next
56 | Until $current = 0
57 | Return SetError(2, 0, 0)
58 | EndFunc ;==>_LinkedList_remove
59 |
60 | Func _LinkedList_add($self, $newdata)
61 | Local $iSize = $self.size
62 | Local $oLast = $self.last
63 | If $iSize = 0 Then
64 | $self.first = __Element__($newdata)
65 | $self.last = $self.first
66 | Else
67 | $oLast.next = __Element__($newdata)
68 | $self.last = $oLast.next
69 | EndIf
70 | $self.size = $iSize + 1
71 | EndFunc ;==>_LinkedList_add
72 |
73 | Func _LinkedList_at($self, $index)
74 | Local $i = 0
75 | For $Element In $self
76 | If $i = $index Then Return $Element
77 | $i += 1
78 | next
79 | Return SetError(1, 0, 0)
80 | EndFunc ;==>_LinkedList_at
81 |
82 | Func _LinkedList_count($self)
83 | Return $self.size
84 | EndFunc ;==>_LinkedList_count
85 |
86 | Func _LinkedList_EnumReset(ByRef $self, ByRef $iterator)
87 | #forceref $self
88 | $iterator = 0
89 | EndFunc ;==>_LinkedList_EnumReset
90 |
91 | Func _LinkedList_Enumnext(ByRef $self, ByRef $iterator)
92 | If $self.size = 0 Then Return SetError(1, 0, 0)
93 | If Not IsObj($iterator) Then
94 | $iterator = $self.first
95 | Return $iterator.data
96 | EndIf
97 | If Not IsObj($iterator.next) Then Return SetError(1, 0, 0)
98 | $iterator = $iterator.next
99 | Return $iterator.data
100 | EndFunc ;==>_LinkedList_Enumnext
101 |
--------------------------------------------------------------------------------
/main.au3:
--------------------------------------------------------------------------------
1 | #AutoIt3Wrapper_Run_Au3Stripper=y
2 | #Au3Stripper_Parameters=/MO
3 |
4 | #Region license
5 | ; -----------------------------------------------------------------------------
6 | ; Simple IP Config is free software: you can redistribute it and/or modify
7 | ; it under the terms of the GNU General Public License as published by
8 | ; the Free Software Foundation, either version 3 of the License, or
9 | ; (at your option) any later version.
10 | ;
11 | ; Simple IP Config is distributed in the hope that it will be useful,
12 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ; GNU General Public License for more details.
15 | ;
16 | ; You should have received a copy of the GNU General Public License
17 | ; along with Simple IP Config. If not, see .
18 | ; -----------------------------------------------------------------------------
19 | #EndRegion license
20 |
21 | ;==============================================================================
22 | ; Filename: main.au3
23 | ; Description: - call functions to read profiles, get adapters list, create the gui
24 | ; - while loop to keep program running
25 | ; - check for instance already running
26 | ;==============================================================================
27 |
28 |
29 | ;==============================================================================
30 | ;
31 | ; Name: Simple IP Config
32 | ;
33 | ; Description: Simple IP Config is a program for Windows to easily change
34 | ; various network settings in a format similar to the
35 | ; built-in Windows configuration.
36 | ;
37 | ; Required OS: Windows XP, Windows Vista, Windows 7, Windows 8, Window 8.1, Windows 10
38 | ;
39 | ; Author: Kurtis Liggett
40 | ;
41 | ;==============================================================================
42 |
43 | #RequireAdmin
44 | #NoTrayIcon ;prevent double icon when checking for already running instance
45 |
46 | #include
47 | #include
48 | #include
49 | #include
50 | #include
51 | #include
52 | #include
53 | #include
54 | #include
55 | #include
56 | #include
57 | #include
58 | #include
59 | #include
60 | #include
61 | #include
62 | #include
63 | #include
64 |
65 | #include "libraries\GetInstalledPath.au3"
66 | #include "libraries\AutoItObject.au3"
67 | #include "libraries\oLinkedList.au3"
68 | _AutoItObject_StartUp()
69 |
70 | #Region options
71 | Opt("TrayIconHide", 0)
72 | Opt("GUIOnEventMode", 1)
73 | Opt("TrayAutoPause", 0)
74 | Opt("TrayOnEventMode", 1)
75 | Opt("TrayMenuMode", 3)
76 | Opt("MouseCoordMode", 2)
77 | Opt("GUIResizeMode", $GUI_DOCKALL)
78 | Opt("WinSearchChildren", 1)
79 | Opt("GUICloseOnESC", 0)
80 | ;~ Opt("MustDeclareVars", 1)
81 | TraySetClick(16)
82 | #EndRegion options
83 |
84 | ; autoit wrapper options
85 | #AutoIt3Wrapper_Res_HiDpi=y
86 | #AutoIt3Wrapper_UseX64=N
87 | #AutoIt3Wrapper_Icon=icon.ico
88 | #AutoIt3Wrapper_OutFile=Simple IP Config 2.9.8-b1.exe
89 | #AutoIt3Wrapper_Res_Fileversion=2.9.8
90 | #AutoIt3Wrapper_Res_Description=Simple IP Config
91 |
92 | #Region Global Variables
93 | Global $options
94 | Global $profiles
95 | Global $adapters
96 |
97 | #include
98 |
99 | ; Global constants, for code readability
100 | Global Const $wbemFlagReturnImmediately = 0x10
101 | Global Const $wbemFlagForwardOnly = 0x20
102 |
103 | Global $screenshot = 1
104 | Global $sProfileName
105 |
106 | ;set profile name based on installation and script dir
107 | _setProfilesIniLocation()
108 |
109 |
110 | ;GUI stuff
111 | Global $winName = "Simple IP Config"
112 | Global $winVersion = "2.9.8-b1"
113 | Global $winDate = "5/15/2023"
114 | Global $hgui
115 | Global $guiWidth = 600
116 | Global $guiHeight = 675
117 | Global $footerHeight = 16
118 | Global $tbarHeight = 0
119 | Global $dscale = 1
120 | Global $iDPI = 0
121 | Global $infoWidth = 395
122 | Global $guiMinWidth, $guiMinHeight, $guiMaxWidth, $guiMaxHeight, $guiRightWidth
123 |
124 | Global $headingHeight = 20
125 | Global $menuHeight, $captionHeight
126 | Global $MinToTray, $RestoreItem, $aboutitem, $exititem, $exititemtray
127 |
128 | Global $aAccelKeys[12][2]
129 |
130 | ;GUI Fonts
131 | Global $MyGlobalFontName = "Arial"
132 | Global $MyGlobalFontSize = 9.5
133 | Global $MYGlobalFontSizeLarge = 11
134 | Global $MyGlobalFontColor = 0x000000
135 | Global $MyGlobalFontBKColor = $GUI_BKCOLOR_TRANSPARENT
136 | Global $MyGlobalFontHeight = 0
137 |
138 | ;Statusbar
139 | Global $statusbarHeight = 20
140 | Global $statusChild, $RestartChild
141 | Global $statustext, $statuserror, $sStatusMessage
142 | Global $wgraphic, $showWarning, $statusPopupEdit
143 |
144 | ;Menu Items
145 | Global $filemenu, $applyitem, $renameitem, $newitem, $saveitem, $deleteitem, $clearitem, $createLinkItem, $profilesOpenItem, $profilesImportItem, $profilesExportItem, $exititem, $netConnItem
146 | Global $viewmenu, $refreshitem, $send2trayitem, $blacklistitem, $appearancemenu, $lightmodeitem, $darkmodeitem
147 | Global $toolsmenu, $pullitem, $disableitem, $releaseitem, $renewitem, $cycleitem, $settingsitem
148 | Global $helpmenu, $helpitem, $changelogitem, $checkUpdatesItem, $debugmenuitem, $infoitem
149 |
150 | Global $lvcon_rename, $lvcon_delete, $lvcon_arrAz, $lvcon_arrZa, $lvcreateLinkItem
151 |
152 | ;Settings window
153 | Global $ck_mintoTray, $ck_startinTray, $ck_saveAdapter, $ck_autoUpdate, $cmb_langSelect
154 |
155 | Global $timerstart, $timervalue
156 |
157 | Global $movetosubnet
158 | Global $mdblTimerInit = 0, $mdblTimerDiff = 1000, $mdblClick = 0, $mDblClickTime = 500
159 | Global $dragging = False, $dragitem = 0, $contextSelect = 0
160 | Global $prevWinPos, $winPosTimer, $writePos
161 | Global $OpenFileFlag, $ImportFileFlag, $ExportFileFlag
162 | Global $buttonCopyOffset, $buttonPasteOffset, $buttonRefreshOffset, $buttonApplyOffset, $IpAddressOffset
163 |
164 | ; CONTROLS
165 | Global $combo_adapters, $combo_dummy, $selected_adapter, $lDescription, $lMac
166 | Global $list_profiles, $input_filter, $filter_dummy, $dummyUp, $dummyDown
167 | Global $lv_oldName, $lv_newName, $lv_editIndex, $lv_doneEditing, $lv_newItem, $lv_startEditing, $lv_editing, $lv_aboutEditing, $lvTabKey
168 | Global $radio_IpAuto, $radio_IpMan, $ip_Ip, $ip_Subnet, $ip_Gateway, $dummyTab
169 | Global $radio_DnsAuto, $radio_DnsMan, $ip_DnsPri, $ip_DnsAlt
170 | Global $label_CurrentIp, $label_CurrentSubnet, $label_CurrentGateway
171 | Global $label_CurrentDnsPri, $label_CurrentDnsAlt
172 | Global $label_CurrentDhcp, $label_CurrentAdapterState
173 | Global $link, $computerName, $domainName
174 | Global $blacklistLV
175 | Global $button_New, $button_Save, $button_Delete, $menuLineBottom, $menuLineRight, $menuLineSep, $memo, $memoBackground, $memoLabel, $memoLabelBackground, $memoCtrls[6]
176 |
177 | Global $headingSelect, $headingProfiles, $headingIP, $headingCurrent
178 | Global $label_CurrIp, $label_CurrSubnet, $label_CurrGateway, $label_CurrDnsPri, $label_CurrDnsAlt, $label_CurrDhcp, $label_CurrAdapterState
179 | Global $radio_IpAutoLabel, $radio_IpManLabel, $radio_DnsAutoLabel, $radio_DnsmanLabel, $ck_dnsRegLabel
180 | Global $label_DnsPri, $label_DnsAlt, $ck_dnsReg, $label_ip, $label_subnet, $label_gateway
181 | Global $buttonCopyIp, $buttonPasteIp, $buttonCopySubnet, $buttonPasteSubnet, $buttonCopyGateway, $buttonPasteGateway
182 | Global $buttonRefresh, $buttonCopyDnsPri, $buttonPasteDnsPri, $buttonCopyDnsAlt, $buttonPasteDnsAlt
183 | Global $searchgraphic, $filter_background, $filter_border, $lvBackground, $statusbar_background, $profilebuttons_background
184 | Global $currentInfoBox, $setInfoBox
185 |
186 | ; TOOLBAR
187 | Global $oToolbar, $oToolbar2, $tbButtonApply
188 |
189 | ; LANGUAGE VARIABLES
190 | Global $oLangStrings
191 | #EndRegion Global Variables
192 |
193 | #include "libraries\Json\json.au3"
194 | #include "data\adapters.au3"
195 | #include "data\options.au3"
196 | #include "data\profiles.au3"
197 | #include "hexIcons.au3"
198 | #include "languages.au3"
199 | #include "libraries\asyncRun.au3"
200 | #include "libraries\StringSize.au3"
201 | #include "libraries\Toast.au3"
202 | #include "libraries\_NetworkStatistics.au3"
203 | #include "libraries\GuiFlatToolbar.au3"
204 | #include "functions.au3"
205 | #include "events.au3"
206 | #include "network.au3"
207 | #include "forms\_form_main.au3"
208 | #include "forms\_form_about.au3"
209 | #include "forms\_form_changelog.au3"
210 | #include "forms\_form_debug.au3"
211 | #include "forms\_form_blacklist.au3"
212 | #include "forms\_form_settings.au3"
213 | #include "forms\_form_update.au3"
214 | #include "forms\_form_restart.au3"
215 | #include "forms\_form_error.au3"
216 | #include "cli.au3"
217 |
218 | #Region PROGRAM CONTROL
219 | ;create the main 'objects'
220 | $options = _Options()
221 | $profiles = _Profiles()
222 | $adapters = Adapter()
223 |
224 | ;initialize language strings
225 | _initLang()
226 |
227 | ;check to see if called with command line arguments
228 | CheckCmdLine()
229 |
230 | ;create a new window message
231 | Global $iMsg = _WinAPI_RegisterWindowMessage('newinstance_message')
232 |
233 | ;Check if already running. If running, send a message to the first
234 | ;instance to show a popup message then close this instance.
235 | If _Singleton("Simple IP Config", 1) = 0 Then
236 | _WinAPI_PostMessage(0xffff, $iMsg, 0x101, 0)
237 | Exit
238 | EndIf
239 |
240 | ;begin main program
241 | _main()
242 | #EndRegion PROGRAM CONTROL
243 |
244 | ;------------------------------------------------------------------------------
245 | ; Title........: _main
246 | ; Description..: initial program setup & main running loop
247 | ;------------------------------------------------------------------------------
248 | Func _main()
249 | _print("starting")
250 |
251 | _print("init lang")
252 | ; popuplate current adapter names and mac addresses
253 | ;_loadAdapters()
254 |
255 | ; get current DPI scale factor
256 | $dscale = _GDIPlus_GraphicsGetDPIRatio()
257 | $iDPI = $dscale * 96
258 |
259 | ;get profiles list
260 | _loadProfiles()
261 | _print("load profiles")
262 |
263 | ;get OS language OR selected language storage in profile
264 | $selectedLang = $options.Language
265 | If $selectedLang <> "" And $oLangStrings.OSLang <> $selectedLang Then
266 | $oLangStrings.OSLang = $selectedLang
267 | EndIf
268 |
269 | _setLangStrings($oLangStrings.OSLang)
270 | _print("set lang")
271 |
272 | ;make the GUI
273 | _form_main()
274 | _print("make GUI")
275 |
276 | ;get list of adapters and current IP info
277 | _loadAdapters()
278 | _print("load adapters")
279 |
280 | ;watch for new program instances
281 | GUIRegisterMsg($iMsg, '_NewInstance')
282 |
283 | ;Add adapters the the combobox
284 | ;~ If Not IsArray($adapters) Then
285 | ;~ MsgBox(16, $oLangStrings.message.error, $oLangStrings.message.errorRetrieving)
286 | ;~ Else
287 | ;~ Adapter_Sort($adapters) ; connections sort ascending
288 | ;~ $defaultitem = Adapter_GetName($adapters, 0)
289 | ;~ $sStartupAdapter = $options.StartupAdapter
290 | ;~ If Adapter_Exists($adapters, $sStartupAdapter) Then
291 | ;~ $defaultitem = $sStartupAdapter
292 | ;~ EndIf
293 |
294 | ;~ $sAdapterBlacklist = $options.AdapterBlacklist
295 | ;~ $aBlacklist = StringSplit($sAdapterBlacklist, "|")
296 | ;~ If IsArray($aBlacklist) Then
297 | ;~ Local $adapterNames = Adapter_GetNames($adapters)
298 | ;~ For $i = 0 To UBound($adapterNames) - 1
299 | ;~ $indexBlacklist = _ArraySearch($aBlacklist, $adapterNames[$i], 1)
300 | ;~ If $indexBlacklist <> -1 Then ContinueLoop
301 | ;~ GUICtrlSetData($combo_adapters, $adapterNames[$i], $defaultitem)
302 | ;~ Next
303 | ;~ EndIf
304 | ;~ EndIf
305 |
306 | _refresh(1)
307 | ControlListView($hgui, "", $list_profiles, "Select", 0)
308 |
309 | ;get system double-click time
310 | $retval = DllCall('user32.dll', 'uint', 'GetDoubleClickTime')
311 | $mDblClickTime = $retval[0]
312 |
313 | ;see if we should display the changelog
314 | _checkChangelog()
315 |
316 | ;get the domain
317 | GUICtrlSetData($domainName, _DomainComputerBelongs())
318 |
319 | $sAutoUpdate = $options.AutoUpdate
320 | If ($sAutoUpdate = "true" Or $sAutoUpdate = "1") Then
321 | $suppressComError = 1
322 | _checksSICUpdate()
323 | $suppressComError = 0
324 | EndIf
325 |
326 | Local $filePath
327 | _print("Running")
328 | While 1
329 | ;~ If $dragging Then
330 | ;~ Local $aLVHit = _GUICtrlListView_HitTest(GUICtrlGetHandle($list_profiles))
331 | ;~ Local $iCurr_Index = $aLVHit[0]
332 | ;~ If $iCurr_Index >= $dragitem Then
333 | ;~ _GUICtrlListView_SetInsertMark($list_profiles, $iCurr_Index, True)
334 | ;~ Else
335 | ;~ _GUICtrlListView_SetInsertMark($list_profiles, $iCurr_Index, False)
336 | ;~ EndIf
337 | ;~ EndIf
338 |
339 | If $lv_doneEditing Then
340 | _onLvDoneEdit()
341 | EndIf
342 |
343 | If $lv_startEditing And Not $lv_editing Then
344 | _onRename()
345 | EndIf
346 |
347 | If $movetosubnet Then
348 | _MoveToSubnet()
349 | EndIf
350 |
351 | If $OpenFileFlag Then
352 | $OpenFileFlag = 0
353 | $filePath = FileOpenDialog($oLangStrings.dialog.selectFile, @ScriptDir, $oLangStrings.dialog.ini & " (*.ini)", $FD_FILEMUSTEXIST, "profiles.ini")
354 | If Not @error Then
355 | $sProfileName = $filePath
356 | $options = _Options()
357 | $profiles = _Profiles()
358 | _refresh(1)
359 | _setStatus($oLangStrings.message.loadedFile & " " & $filePath, 0)
360 | EndIf
361 | EndIf
362 |
363 | If $ImportFileFlag Then
364 | $ImportFileFlag = 0
365 | $filePath = FileOpenDialog($oLangStrings.dialog.selectFile, @ScriptDir, $oLangStrings.dialog.ini & " (*.ini)", $FD_FILEMUSTEXIST, "profiles.ini")
366 | If Not @error Then
367 | _ImportProfiles($filePath)
368 | _refresh(1)
369 | _setStatus($oLangStrings.message.doneImporting, 0)
370 | EndIf
371 | EndIf
372 |
373 | If $ExportFileFlag Then
374 | $ExportFileFlag = 0
375 | $filePath = FileSaveDialog($oLangStrings.dialog.selectFile, @ScriptDir, $oLangStrings.dialog.ini & " (*.ini)", $FD_PROMPTOVERWRITE, "profiles.ini")
376 | If Not @error Then
377 | If StringRight($filePath, 4) <> ".ini" Then
378 | $filePath &= ".ini"
379 | EndIf
380 | FileCopy($sProfileName, $filePath, $FC_OVERWRITE)
381 | _setStatus($oLangStrings.message.fileSaved & ": " & $filePath, 0)
382 | EndIf
383 | EndIf
384 |
385 | If $lvTabKey And Not IsHWnd(_GUICtrlListView_GetEditControl(ControlGetHandle($hgui, "", $list_profiles))) Then
386 | $lvTabKey = False
387 | Send("{TAB}")
388 | EndIf
389 |
390 | Sleep(100)
391 | WEnd
392 | EndFunc ;==>_main
393 |
394 | ;------------------------------------------------------------------------------
395 | ; Title........: _NewInstance
396 | ; Description..: Called when a new program instance posts the message we were watching for.
397 | ; Bring the running program instance to the foreground.
398 | ;------------------------------------------------------------------------------
399 | Func _NewInstance($hWnd, $iMsg, $iwParam, $ilParam)
400 | If $iwParam == "0x00000101" Then
401 | ;~ TrayTip("", "Simple IP Config is already running", 1)
402 |
403 | ;~ $sMsg = 'Simple IP Config is already running'
404 | ;~ _Toast_Set(0, 0xAAAAAA, 0x000000, 0xFFFFFF, 0x000000, 10, "", 250, 250)
405 | ;~ $aRet = _Toast_Show(0, "Simple IP Config", $sMsg, -5, False) ; Delay can be set here because script continues
406 |
407 | _maximize()
408 | EndIf
409 | EndFunc ;==>_NewInstance
410 |
411 |
412 | Func _setProfilesIniLocation()
413 | Local $isPortable = True
414 |
415 | ;if profiles.ini exists in the exe directory, always choose that first, otherwise check for install
416 | If FileExists(@ScriptDir & "\profiles.ini") Then
417 | $isPortable = True
418 | Else
419 | ;get install path and check if running from installed or other directory
420 | Local $sDisplayName
421 | Local $InstallPath = _GetInstalledPath("Simple IP Config", $sDisplayName)
422 |
423 | If @error Then
424 | ;program is not installed
425 | $isPortable = True
426 | Else
427 | ;program is installed, check if running from install directory
428 | Local $scriptPath = @ScriptDir
429 | If StringRight(@ScriptDir, 1) <> "\" Then
430 | $scriptPath &= "\"
431 | EndIf
432 |
433 | If $InstallPath = $scriptPath Then
434 | $isPortable = False
435 | Else
436 | $isPortable = True
437 | EndIf
438 | EndIf
439 | EndIf
440 |
441 | If $isPortable Then
442 | $sProfileName = @ScriptDir & "\profiles.ini"
443 | Else
444 | If Not FileExists(@LocalAppDataDir & "\Simple IP Config") Then
445 | DirCreate(@LocalAppDataDir & "\Simple IP Config")
446 | EndIf
447 | $sProfileName = @LocalAppDataDir & "\Simple IP Config\profiles.ini"
448 | EndIf
449 | EndFunc ;==>_setProfilesIniLocation
450 |
--------------------------------------------------------------------------------
/network.au3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KurtisLiggett/Simple-IP-Config/eb75a70d590b7b8da57f8f4fd46be78991122b1e/network.au3
--------------------------------------------------------------------------------