AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Network Connections Names

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
duckati



Joined: 08 May 2006
Posts: 9
Location: ITALY

PostPosted: Sat Feb 23, 2008 5:36 pm    Post subject: Network Connections Names Reply with quote

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
View user's profile Send private message
ahklerner



Joined: 26 Jun 2006
Posts: 1249
Location: USA

PostPosted: Sat Feb 23, 2008 6:01 pm    Post subject: Reply with quote

ipconfig / all
_________________

ʞɔпɟ əɥʇ ʇɐɥʍ
Back to top
View user's profile Send private message
duckati



Joined: 08 May 2006
Posts: 9
Location: ITALY

PostPosted: Mon Feb 25, 2008 7:53 am    Post subject: Reply with quote

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
View user's profile Send private message
Sajith



Joined: 19 Feb 2008
Posts: 2
Location: India

PostPosted: Mon Feb 25, 2008 10:44 am    Post subject: Network Connections Names Reply with quote

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.

Laughing
_________________
Cheers
Sajith
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
duckati



Joined: 08 May 2006
Posts: 9
Location: ITALY

PostPosted: Tue Feb 26, 2008 8:46 am    Post subject: Reply with quote

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
View user's profile Send private message
duckati



Joined: 08 May 2006
Posts: 9
Location: ITALY

PostPosted: Wed Feb 27, 2008 7:50 am    Post subject: Reply with quote

up
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group