 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
duckati
Joined: 08 May 2006 Posts: 9 Location: ITALY
|
Posted: Sat Feb 23, 2008 5:36 pm Post subject: Network Connections Names |
|
|
With the following simple script I run the Network Connections Window.
Run ::{7007acc7-3202-11d1-aad2-00805fc1270e}
WinWait, Connessioni di rete
WinGetText, text
MsgBox, The text is:`n%text%
Is there a way to get back the name of every single connection ??
Thanks in advance for your effort. |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1249 Location: USA
|
Posted: Sat Feb 23, 2008 6:01 pm Post subject: |
|
|
ipconfig / all _________________
ʞɔпɟ əɥʇ ʇɐɥʍ |
|
| Back to top |
|
 |
duckati
Joined: 08 May 2006 Posts: 9 Location: ITALY
|
Posted: Mon Feb 25, 2008 7:53 am Post subject: |
|
|
Sorry. Maybe I not explained very well. I'd like to get back the name of every single connection and to put the results into a GUI in a DropDownList.
Thanks in advance for your effort. |
|
| Back to top |
|
 |
Sajith
Joined: 19 Feb 2008 Posts: 2 Location: India
|
Posted: Mon Feb 25, 2008 10:44 am Post subject: Network Connections Names |
|
|
| Code: | DetectHiddenWindows On
Run ::{7007acc7-3202-11d1-aad2-00805fc1270e},,HIDE
WinWait ahk_class CabinetWClass
Loop {
Sleep 500
ControlGet prova, list, Col1, SysListView321, ahk_class CabinetWClass
IfEqual prova,%provb%, Break
provb = %prova%
}
WinClose ahk_class CabinetWClass
Gui, Add, text, x300 y82 w250 h25,Available Network Connection.
controlsettext,dropdownlist,%connection%
gui,add,dropdownlist,x500 y80 w135 h100 vconnection
Stringsplit, prova, prova,`n
loop,%prova0%
{
connectionindex:=prova%a_index%
guicontrol,,connection,%connectionindex%
}
Gui, Show, x137 y129 h470 w700,network connection. |
 _________________ Cheers
Sajith |
|
| Back to top |
|
 |
duckati
Joined: 08 May 2006 Posts: 9 Location: ITALY
|
Posted: Tue Feb 26, 2008 8:46 am Post subject: |
|
|
Thanks Sajith. Very good job....
But I have another question for you...
Is there a way to hide the disabled or disconnected connection ???
Thanks in advance.
P.S. I find this way but I think it run only with ITALIAN version of Win XP
| Code: |
FileDelete, *.txt
sleep, 100
RunWait %comspec% /c ipconfig /all > net_list.txt,,Hide
Loop, read, net_list.txt, desc_list.txt
{
IfInString, A_LoopReadLine, Scheda Ethernet, FileAppend, %A_LoopReadLine%
}
FileRead, desc_var, desc_list.txt
StringReplace, desc_var, desc_var, Scheda%A_SPACE%Ethernet%A_SPACE% , , 1
StringReplace, desc_var, desc_var, `r, , 1
Gui +Delimiter:
Gui, Add, DropDownList, x6 y7 w270 h20 vScegli_net R5 Choose1 Sort, %desc_var%
Gui, Show, h41 w290, New GUI Window
Return
GuiClose:
ExitApp |
|
|
| Back to top |
|
 |
duckati
Joined: 08 May 2006 Posts: 9 Location: ITALY
|
Posted: Wed Feb 27, 2008 7:50 am Post subject: |
|
|
| up |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|