SlideShare a Scribd company logo
CONFIDENTIAL – COPYRIGHT ©2009 – ALES
AUTOMATIC ESTABLISHMENT OF THE RAS CONNECTION OR HOW I LEARNT TO PRESS THE ENTER
BUTTON FOR THE WHOLE SATURDAY
'********************************************************************************
Poznamka: [1.] Budeme potrebovat nalinkovat dynamickou knihovnu Windows USER32,
ktera nam poskytne aplikacni programatorske rozhrani API pro volani funkci
poskytovane touto knihovnou. API predepisuje zpusob volani funkci dane knihovny
ze zdrojoveho kodu (meho) programu. V soucasne dobe je nejrozsirenejsim
standardem API OS Win32 od Microsoftu a POSIX(IEEE). Windows API (WinAPI, Win32)
je API vyvinute Microsoftem pro OS MS Windows. Vsechny programy v MS Windows musi
nezavisle na pouzitem programovacim jazyce komunikovat prostrednictvim standardu
WinAPI (Win32), ktery obsahuje zakladni funkce. Funkce jsou implementovany v
zakladnich systemovych DLL kernel32.dll, user32.dll, gdi32.dll. Vyuzijeme pouze
API funkce knihovny user32.dll a kernel32.dll
Poznamka [2.] Bude potreba naistalovat program MSVC Spy++ nebo WINSPECTOR SPY a
detekovat nazvy tridy na bezicich instancich oken a procesu, nazvy buttonu…
'********************************************************************************
Option Explicit
Const BM_CLICK = &HF5
Const WM_CHAR = &H102
'**************************************************************************
'******************* API functions declarations ***************************
'**************************************************************************
Private Declare Function FindWindow Lib "user32.dll" _
Alias "FindWindowA" _
(ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function PostMessage Lib "user32.dll" _
Alias "PostMessageA" _
(ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, lParam As Any) As Long
Private Declare Function SendMessage Lib "user32.dll" _
Alias "SendMessageA" _
(ByVal hWnd As Long, _
ByVal Msg As Long, _
wParam As Any, _
lParam As Any) As Long
Private Declare Function FindWindowEx Lib "user32.dll" _
Alias "FindWindowExA" _
(ByVal hWnd1 As Long, _
ByVal hWnd2 As Long, _
ByVal lpsz1 As String, _
ByVal lpsz2 As String) As Long
Private Declare Function SetFocusAPI Lib "user32.dll" _
Alias "SetFocus" _
(ByVal hWnd As Long) As Long
Private Declare Function SetForegroundWindow Lib "user32.dll" _
(ByVal hWnd As Long) As Boolean
'******************************************************************************
'Now that the API and Variables are set up, it is time for the rest of the code
'******************************************************************************
Sub automatic_RAS()
Dim my_NTConnWindow, my_ITConnMgrWindow, my_buttonA, my_buttonB As Long
Dim my_Connect_ITConnMgrWindow, my_buttonC As Long
Dim my_editBox As Long
Dim PIN As String
Dim i As Byte
'*** Calling API Function
my_NTConnWindow = FindWindow(vbNullString, "Network Connections")
'*** Calling API Function
Call SetForegroundWindow(my_NTConnWindow)
'If NajdiOkno <> 0 Then
'napr. lze zavrit okno takto pomoci &H10 ZAVRE OKNO:
'Messages = PostMessage(NajdiOkno, &H10, 0&, 0&)
'End If
'*** Calling API Function
my_buttonA = FindWindowEx(my_NTConnWindow, ByVal 0&, "button", "&Connect...")
'*** Calling API Function
Call SetFocusAPI(my_buttonA)
'******** Calling API Function **********
Call PostMessage(my_buttonA, BM_CLICK, 0&, 0&)
'pozn. SendMessage also hits the Connect.. and pops up IT Connection Mgr
'but fails to stop itself and is still running like in some loop?
'*** Calling API Function, all over again for the next IT Connection Mgr Win
Application.Wait (Now + TimeValue("0:00:03"))
my_ITConnMgrWindow = FindWindow(vbNullString, "IT Connection Manager")
'Call SetForegroundWindow(my_ITConnMgrWindow)
Application.Wait (Now + TimeValue("0:00:03"))
my_buttonB = FindWindowEx(my_ITConnMgrWindow, ByVal 0&, "button", "Connect")
Application.Wait (Now + TimeValue("0:00:03"))
'DoEvents
'Call SetFocusAPI(my_buttonB)
Call PostMessage(my_buttonB, BM_CLICK, 0&, 0&)
'mozny zpusob:
'Call PostMessage(my_buttonB, WM_LBUTTONDOWN, 0&, 0&)
'Call PostMessage(my_buttonB, WM_LBUTTONUP, 0&, 0&)
Application.Wait (Now + TimeValue("0:00:03"))
my_Connect_ITConnMgrWindow = FindWindow(vbNullString, "Connect IT Connection
Manager")
'*password
my_editBox = FindWindowEx(my_Connect_ITConnMgrWindow, ByVal 0&, "edit", "")
my_buttonC = FindWindowEx(my_Connect_ITConnMgrWindow, ByVal 0&, "button",
"OK")
'DoEvents
'Call SetFocusAPI(my_buttonB)
PIN = "112233"
For i = 1 To Len(PIN)
Call PostMessage(my_editBox, WM_CHAR, Asc(Mid(PIN, i, 1)), 0&)
Next i
Call PostMessage(my_buttonC, BM_CLICK, 0&, 0&)
End Sub

More Related Content

What's hot

20100925 Hangame for iphone 開発秘話
20100925 Hangame for iphone 開発秘話20100925 Hangame for iphone 開発秘話
20100925 Hangame for iphone 開発秘話
NHN Japan (hangame)
 
Real Time Communication using Node.js and Socket.io
Real Time Communication using Node.js and Socket.ioReal Time Communication using Node.js and Socket.io
Real Time Communication using Node.js and Socket.io
Mindfire Solutions
 
Going real time with Socket.io
Going real time with Socket.ioGoing real time with Socket.io
Going real time with Socket.io
Arnout Kazemier
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
John Lynch
 
IronRuby
IronRubyIronRuby
IronRuby
Alex Moore
 
wwc start-launched
wwc start-launchedwwc start-launched
wwc start-launched
Mat Schaffer
 
Retrofit Android by Chris Ollenburg
Retrofit Android by Chris OllenburgRetrofit Android by Chris Ollenburg
Retrofit Android by Chris Ollenburg
Trey Robinson
 
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express
Jeetendra singh
 
Md+wiki
Md+wikiMd+wiki
Copying files between linux machines using scp and ssh without linux user pas...
Copying files between linux machines using scp and ssh without linux user pas...Copying files between linux machines using scp and ssh without linux user pas...
Copying files between linux machines using scp and ssh without linux user pas...
Ravi Kumar Lanke
 
What is nodejs
What is nodejsWhat is nodejs
What is nodejs
JeongHun Byeon
 

What's hot (11)

20100925 Hangame for iphone 開発秘話
20100925 Hangame for iphone 開発秘話20100925 Hangame for iphone 開発秘話
20100925 Hangame for iphone 開発秘話
 
Real Time Communication using Node.js and Socket.io
Real Time Communication using Node.js and Socket.ioReal Time Communication using Node.js and Socket.io
Real Time Communication using Node.js and Socket.io
 
Going real time with Socket.io
Going real time with Socket.ioGoing real time with Socket.io
Going real time with Socket.io
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
IronRuby
IronRubyIronRuby
IronRuby
 
wwc start-launched
wwc start-launchedwwc start-launched
wwc start-launched
 
Retrofit Android by Chris Ollenburg
Retrofit Android by Chris OllenburgRetrofit Android by Chris Ollenburg
Retrofit Android by Chris Ollenburg
 
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express
 
Md+wiki
Md+wikiMd+wiki
Md+wiki
 
Copying files between linux machines using scp and ssh without linux user pas...
Copying files between linux machines using scp and ssh without linux user pas...Copying files between linux machines using scp and ssh without linux user pas...
Copying files between linux machines using scp and ssh without linux user pas...
 
What is nodejs
What is nodejsWhat is nodejs
What is nodejs
 

Viewers also liked

Madigan, Edwin 2009
Madigan, Edwin 2009Madigan, Edwin 2009
Madigan, Edwin 2009
edmadigan
 
Star wars a clone apart
Star wars a clone apartStar wars a clone apart
Star wars a clone apart
salvoniluca
 
Trinh chieu
Trinh chieuTrinh chieu
Trinh chieu
Hiep La
 
USMANS-CV (1)
USMANS-CV (1)USMANS-CV (1)
USMANS-CV (1)
Usman fasih
 
O natal veio do paganismo
O natal veio do paganismoO natal veio do paganismo
O natal veio do paganismo
Serginho Fernando
 
Data measurement tools
Data measurement toolsData measurement tools
Data measurement tools
Raja khurram
 

Viewers also liked (7)

Madigan, Edwin 2009
Madigan, Edwin 2009Madigan, Edwin 2009
Madigan, Edwin 2009
 
Star wars a clone apart
Star wars a clone apartStar wars a clone apart
Star wars a clone apart
 
Trinh chieu
Trinh chieuTrinh chieu
Trinh chieu
 
Way out
Way outWay out
Way out
 
USMANS-CV (1)
USMANS-CV (1)USMANS-CV (1)
USMANS-CV (1)
 
O natal veio do paganismo
O natal veio do paganismoO natal veio do paganismo
O natal veio do paganismo
 
Data measurement tools
Data measurement toolsData measurement tools
Data measurement tools
 

Similar to ©️ One of my PROJECTS for MICROSOFT Retail Logistics - AutoRAS - Part C

Formbook - In-depth malware analysis (Botconf 2018)
Formbook - In-depth malware analysis (Botconf 2018)Formbook - In-depth malware analysis (Botconf 2018)
Formbook - In-depth malware analysis (Botconf 2018)
Rémi Jullian
 
Unit 2
Unit 2Unit 2
Unit 2
siddr
 
[db tech showcase 2015 Sapporo HOKKAIDO] MySQL as document database!?
[db tech showcase 2015 Sapporo HOKKAIDO] MySQL as document database!?[db tech showcase 2015 Sapporo HOKKAIDO] MySQL as document database!?
[db tech showcase 2015 Sapporo HOKKAIDO] MySQL as document database!?
Ryusuke Kajiyama
 
An Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemAn Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating System
Linaro
 
Pandora FMS: Cisco Remote inventory modules
Pandora FMS: Cisco Remote inventory modulesPandora FMS: Cisco Remote inventory modules
Pandora FMS: Cisco Remote inventory modules
Pandora FMS
 
Essential Tools for Modern PHP
Essential Tools for Modern PHPEssential Tools for Modern PHP
Essential Tools for Modern PHP
Alex Weissman
 
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Marc Müller
 
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...
BeMyApp
 
Windows PowerShell
Windows PowerShellWindows PowerShell
Automation day red hat ansible
   Automation day red hat ansible    Automation day red hat ansible
Automation day red hat ansible
Rodrigo Missiaggia
 
56_Implementation
56_Implementation56_Implementation
56_Implementation
Prerna Paliwal
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and Chef
Matt Ray
 
[Java Küche RDB 最前線 2015] MySQL 5.7技術アップデート
[Java Küche RDB 最前線 2015] MySQL 5.7技術アップデート[Java Küche RDB 最前線 2015] MySQL 5.7技術アップデート
[Java Küche RDB 最前線 2015] MySQL 5.7技術アップデート
Ryusuke Kajiyama
 
How to Build a Custom Plugin in Rundeck
How to Build a Custom Plugin in RundeckHow to Build a Custom Plugin in Rundeck
How to Build a Custom Plugin in Rundeck
Rundeck
 
Open Source Virtualization Hacks
Open Source Virtualization HacksOpen Source Virtualization Hacks
Open Source Virtualization Hacks
Niel Bornstein
 
Ansible101
Ansible101Ansible101
Ansible101
Hideki Saito
 
Automação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOpsAutomação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOps
Raul Leite
 
A complete guide to Node.js
A complete guide to Node.jsA complete guide to Node.js
A complete guide to Node.js
Prabin Silwal
 
Ansible part for_po_c(w dellos9 dellos10)_ext_v1.0
Ansible part for_po_c(w dellos9 dellos10)_ext_v1.0Ansible part for_po_c(w dellos9 dellos10)_ext_v1.0
Ansible part for_po_c(w dellos9 dellos10)_ext_v1.0
Jo Hoon
 
Android on IA devices and Intel Tools
Android on IA devices and Intel ToolsAndroid on IA devices and Intel Tools
Android on IA devices and Intel Tools
Xavier Hallade
 

Similar to ©️ One of my PROJECTS for MICROSOFT Retail Logistics - AutoRAS - Part C (20)

Formbook - In-depth malware analysis (Botconf 2018)
Formbook - In-depth malware analysis (Botconf 2018)Formbook - In-depth malware analysis (Botconf 2018)
Formbook - In-depth malware analysis (Botconf 2018)
 
Unit 2
Unit 2Unit 2
Unit 2
 
[db tech showcase 2015 Sapporo HOKKAIDO] MySQL as document database!?
[db tech showcase 2015 Sapporo HOKKAIDO] MySQL as document database!?[db tech showcase 2015 Sapporo HOKKAIDO] MySQL as document database!?
[db tech showcase 2015 Sapporo HOKKAIDO] MySQL as document database!?
 
An Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemAn Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating System
 
Pandora FMS: Cisco Remote inventory modules
Pandora FMS: Cisco Remote inventory modulesPandora FMS: Cisco Remote inventory modules
Pandora FMS: Cisco Remote inventory modules
 
Essential Tools for Modern PHP
Essential Tools for Modern PHPEssential Tools for Modern PHP
Essential Tools for Modern PHP
 
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
 
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...
[Android Codefest Germany] Adding x86 target to your Android app by Xavier Ha...
 
Windows PowerShell
Windows PowerShellWindows PowerShell
Windows PowerShell
 
Automation day red hat ansible
   Automation day red hat ansible    Automation day red hat ansible
Automation day red hat ansible
 
56_Implementation
56_Implementation56_Implementation
56_Implementation
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and Chef
 
[Java Küche RDB 最前線 2015] MySQL 5.7技術アップデート
[Java Küche RDB 最前線 2015] MySQL 5.7技術アップデート[Java Küche RDB 最前線 2015] MySQL 5.7技術アップデート
[Java Küche RDB 最前線 2015] MySQL 5.7技術アップデート
 
How to Build a Custom Plugin in Rundeck
How to Build a Custom Plugin in RundeckHow to Build a Custom Plugin in Rundeck
How to Build a Custom Plugin in Rundeck
 
Open Source Virtualization Hacks
Open Source Virtualization HacksOpen Source Virtualization Hacks
Open Source Virtualization Hacks
 
Ansible101
Ansible101Ansible101
Ansible101
 
Automação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOpsAutomação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOps
 
A complete guide to Node.js
A complete guide to Node.jsA complete guide to Node.js
A complete guide to Node.js
 
Ansible part for_po_c(w dellos9 dellos10)_ext_v1.0
Ansible part for_po_c(w dellos9 dellos10)_ext_v1.0Ansible part for_po_c(w dellos9 dellos10)_ext_v1.0
Ansible part for_po_c(w dellos9 dellos10)_ext_v1.0
 
Android on IA devices and Intel Tools
Android on IA devices and Intel ToolsAndroid on IA devices and Intel Tools
Android on IA devices and Intel Tools
 

More from none

© Logistic_certificates_for_new_ideas.pdf
© Logistic_certificates_for_new_ideas.pdf© Logistic_certificates_for_new_ideas.pdf
© Logistic_certificates_for_new_ideas.pdf
none
 
University_Transcripts_Geological_Engineering.pdf
University_Transcripts_Geological_Engineering.pdfUniversity_Transcripts_Geological_Engineering.pdf
University_Transcripts_Geological_Engineering.pdf
none
 
IQ_Tests_GiGi_Certificate_2019-09-21.pdf
IQ_Tests_GiGi_Certificate_2019-09-21.pdfIQ_Tests_GiGi_Certificate_2019-09-21.pdf
IQ_Tests_GiGi_Certificate_2019-09-21.pdf
none
 
© Ales Vicky's Introduction to Theory of Special Relativity
©  Ales Vicky's  Introduction to Theory of Special Relativity©  Ales Vicky's  Introduction to Theory of Special Relativity
© Ales Vicky's Introduction to Theory of Special Relativity
none
 
©️ KANTAR Project Management - All Global Lightspeed Healthcare - 2006-2007
©️ KANTAR Project Management - All Global Lightspeed Healthcare - 2006-2007©️ KANTAR Project Management - All Global Lightspeed Healthcare - 2006-2007
©️ KANTAR Project Management - All Global Lightspeed Healthcare - 2006-2007
none
 
©️ One of my PROJECTS for MICROSOFT Retail Logistics - SKU_set-up_Best Buy PC...
©️ One of my PROJECTS for MICROSOFT Retail Logistics - SKU_set-up_Best Buy PC...©️ One of my PROJECTS for MICROSOFT Retail Logistics - SKU_set-up_Best Buy PC...
©️ One of my PROJECTS for MICROSOFT Retail Logistics - SKU_set-up_Best Buy PC...none
 
©️ SAP ERP Strategy - One of my PowerPoint Presentations - as of February 2012
©️ SAP ERP Strategy - One of my PowerPoint Presentations - as of February 2012©️ SAP ERP Strategy - One of my PowerPoint Presentations - as of February 2012
©️ SAP ERP Strategy - One of my PowerPoint Presentations - as of February 2012none
 
©️ HTC Smartphones - Qualitative Marketing Research & Customer-Focused Insigh...
©️ HTC Smartphones - Qualitative Marketing Research & Customer-Focused Insigh...©️ HTC Smartphones - Qualitative Marketing Research & Customer-Focused Insigh...
©️ HTC Smartphones - Qualitative Marketing Research & Customer-Focused Insigh...none
 
©️ CISCO RMA Service Order Status Business Function
©️ CISCO RMA Service Order Status Business Function©️ CISCO RMA Service Order Status Business Function
©️ CISCO RMA Service Order Status Business Functionnone
 
©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function
©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function
©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Functionnone
 
©️ My Own CISCO BRAINSTORMING IDEAS for CISCO Logistics
©️ My Own CISCO BRAINSTORMING IDEAS for CISCO Logistics©️ My Own CISCO BRAINSTORMING IDEAS for CISCO Logistics
©️ My Own CISCO BRAINSTORMING IDEAS for CISCO Logisticsnone
 

More from none (11)

© Logistic_certificates_for_new_ideas.pdf
© Logistic_certificates_for_new_ideas.pdf© Logistic_certificates_for_new_ideas.pdf
© Logistic_certificates_for_new_ideas.pdf
 
University_Transcripts_Geological_Engineering.pdf
University_Transcripts_Geological_Engineering.pdfUniversity_Transcripts_Geological_Engineering.pdf
University_Transcripts_Geological_Engineering.pdf
 
IQ_Tests_GiGi_Certificate_2019-09-21.pdf
IQ_Tests_GiGi_Certificate_2019-09-21.pdfIQ_Tests_GiGi_Certificate_2019-09-21.pdf
IQ_Tests_GiGi_Certificate_2019-09-21.pdf
 
© Ales Vicky's Introduction to Theory of Special Relativity
©  Ales Vicky's  Introduction to Theory of Special Relativity©  Ales Vicky's  Introduction to Theory of Special Relativity
© Ales Vicky's Introduction to Theory of Special Relativity
 
©️ KANTAR Project Management - All Global Lightspeed Healthcare - 2006-2007
©️ KANTAR Project Management - All Global Lightspeed Healthcare - 2006-2007©️ KANTAR Project Management - All Global Lightspeed Healthcare - 2006-2007
©️ KANTAR Project Management - All Global Lightspeed Healthcare - 2006-2007
 
©️ One of my PROJECTS for MICROSOFT Retail Logistics - SKU_set-up_Best Buy PC...
©️ One of my PROJECTS for MICROSOFT Retail Logistics - SKU_set-up_Best Buy PC...©️ One of my PROJECTS for MICROSOFT Retail Logistics - SKU_set-up_Best Buy PC...
©️ One of my PROJECTS for MICROSOFT Retail Logistics - SKU_set-up_Best Buy PC...
 
©️ SAP ERP Strategy - One of my PowerPoint Presentations - as of February 2012
©️ SAP ERP Strategy - One of my PowerPoint Presentations - as of February 2012©️ SAP ERP Strategy - One of my PowerPoint Presentations - as of February 2012
©️ SAP ERP Strategy - One of my PowerPoint Presentations - as of February 2012
 
©️ HTC Smartphones - Qualitative Marketing Research & Customer-Focused Insigh...
©️ HTC Smartphones - Qualitative Marketing Research & Customer-Focused Insigh...©️ HTC Smartphones - Qualitative Marketing Research & Customer-Focused Insigh...
©️ HTC Smartphones - Qualitative Marketing Research & Customer-Focused Insigh...
 
©️ CISCO RMA Service Order Status Business Function
©️ CISCO RMA Service Order Status Business Function©️ CISCO RMA Service Order Status Business Function
©️ CISCO RMA Service Order Status Business Function
 
©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function
©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function
©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function
 
©️ My Own CISCO BRAINSTORMING IDEAS for CISCO Logistics
©️ My Own CISCO BRAINSTORMING IDEAS for CISCO Logistics©️ My Own CISCO BRAINSTORMING IDEAS for CISCO Logistics
©️ My Own CISCO BRAINSTORMING IDEAS for CISCO Logistics
 

Recently uploaded

Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
Pedro J. Molina
 
Ensuring Efficiency and Speed with Practical Solutions for Clinical Operations
Ensuring Efficiency and Speed with Practical Solutions for Clinical OperationsEnsuring Efficiency and Speed with Practical Solutions for Clinical Operations
Ensuring Efficiency and Speed with Practical Solutions for Clinical Operations
OnePlan Solutions
 
Computer Science & Engineering VI Sem- New Syllabus.pdf
Computer Science & Engineering VI Sem- New Syllabus.pdfComputer Science & Engineering VI Sem- New Syllabus.pdf
Computer Science & Engineering VI Sem- New Syllabus.pdf
chandangoswami40933
 
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data PlatformAlluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio, Inc.
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
kgyxske
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
michniczscribd
 
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Ortus Solutions, Corp
 
Optimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptxOptimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptx
WebConnect Pvt Ltd
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
Maitrey Patel
 
Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.
KrishnaveniMohan1
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
Zycus
 
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery FleetStork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Vince Scalabrino
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
vaishalijagtap12
 
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
dhavalvaghelanectarb
 
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdfSoftware Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
kalichargn70th171
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
The Third Creative Media
 
What’s New in VictoriaLogs - Q2 2024 Update
What’s New in VictoriaLogs - Q2 2024 UpdateWhat’s New in VictoriaLogs - Q2 2024 Update
What’s New in VictoriaLogs - Q2 2024 Update
VictoriaMetrics
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Paul Brebner
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 

Recently uploaded (20)

Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
 
Ensuring Efficiency and Speed with Practical Solutions for Clinical Operations
Ensuring Efficiency and Speed with Practical Solutions for Clinical OperationsEnsuring Efficiency and Speed with Practical Solutions for Clinical Operations
Ensuring Efficiency and Speed with Practical Solutions for Clinical Operations
 
Computer Science & Engineering VI Sem- New Syllabus.pdf
Computer Science & Engineering VI Sem- New Syllabus.pdfComputer Science & Engineering VI Sem- New Syllabus.pdf
Computer Science & Engineering VI Sem- New Syllabus.pdf
 
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data PlatformAlluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
 
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
Strengthening Web Development with CommandBox 6: Seamless Transition and Scal...
 
Optimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptxOptimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptx
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
 
Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.Penify - Let AI do the Documentation, you write the Code.
Penify - Let AI do the Documentation, you write the Code.
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
 
bgiolcb
bgiolcbbgiolcb
bgiolcb
 
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery FleetStork Product Overview: An AI-Powered Autonomous Delivery Fleet
Stork Product Overview: An AI-Powered Autonomous Delivery Fleet
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
 
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
 
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdfSoftware Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
 
What’s New in VictoriaLogs - Q2 2024 Update
What’s New in VictoriaLogs - Q2 2024 UpdateWhat’s New in VictoriaLogs - Q2 2024 Update
What’s New in VictoriaLogs - Q2 2024 Update
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 

©️ One of my PROJECTS for MICROSOFT Retail Logistics - AutoRAS - Part C

  • 1. CONFIDENTIAL – COPYRIGHT ©2009 – ALES AUTOMATIC ESTABLISHMENT OF THE RAS CONNECTION OR HOW I LEARNT TO PRESS THE ENTER BUTTON FOR THE WHOLE SATURDAY '******************************************************************************** Poznamka: [1.] Budeme potrebovat nalinkovat dynamickou knihovnu Windows USER32, ktera nam poskytne aplikacni programatorske rozhrani API pro volani funkci poskytovane touto knihovnou. API predepisuje zpusob volani funkci dane knihovny ze zdrojoveho kodu (meho) programu. V soucasne dobe je nejrozsirenejsim standardem API OS Win32 od Microsoftu a POSIX(IEEE). Windows API (WinAPI, Win32) je API vyvinute Microsoftem pro OS MS Windows. Vsechny programy v MS Windows musi nezavisle na pouzitem programovacim jazyce komunikovat prostrednictvim standardu WinAPI (Win32), ktery obsahuje zakladni funkce. Funkce jsou implementovany v zakladnich systemovych DLL kernel32.dll, user32.dll, gdi32.dll. Vyuzijeme pouze API funkce knihovny user32.dll a kernel32.dll Poznamka [2.] Bude potreba naistalovat program MSVC Spy++ nebo WINSPECTOR SPY a detekovat nazvy tridy na bezicich instancich oken a procesu, nazvy buttonu… '******************************************************************************** Option Explicit Const BM_CLICK = &HF5 Const WM_CHAR = &H102 '************************************************************************** '******************* API functions declarations *************************** '************************************************************************** Private Declare Function FindWindow Lib "user32.dll" _ Alias "FindWindowA" _ (ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long Private Declare Function PostMessage Lib "user32.dll" _ Alias "PostMessageA" _ (ByVal hWnd As Long, _ ByVal wMsg As Long, _ ByVal wParam As Long, lParam As Any) As Long Private Declare Function SendMessage Lib "user32.dll" _ Alias "SendMessageA" _ (ByVal hWnd As Long, _ ByVal Msg As Long, _ wParam As Any, _ lParam As Any) As Long
  • 2. Private Declare Function FindWindowEx Lib "user32.dll" _ Alias "FindWindowExA" _ (ByVal hWnd1 As Long, _ ByVal hWnd2 As Long, _ ByVal lpsz1 As String, _ ByVal lpsz2 As String) As Long Private Declare Function SetFocusAPI Lib "user32.dll" _ Alias "SetFocus" _ (ByVal hWnd As Long) As Long Private Declare Function SetForegroundWindow Lib "user32.dll" _ (ByVal hWnd As Long) As Boolean '****************************************************************************** 'Now that the API and Variables are set up, it is time for the rest of the code '****************************************************************************** Sub automatic_RAS() Dim my_NTConnWindow, my_ITConnMgrWindow, my_buttonA, my_buttonB As Long Dim my_Connect_ITConnMgrWindow, my_buttonC As Long Dim my_editBox As Long Dim PIN As String Dim i As Byte '*** Calling API Function my_NTConnWindow = FindWindow(vbNullString, "Network Connections") '*** Calling API Function Call SetForegroundWindow(my_NTConnWindow) 'If NajdiOkno <> 0 Then 'napr. lze zavrit okno takto pomoci &H10 ZAVRE OKNO: 'Messages = PostMessage(NajdiOkno, &H10, 0&, 0&) 'End If '*** Calling API Function my_buttonA = FindWindowEx(my_NTConnWindow, ByVal 0&, "button", "&Connect...") '*** Calling API Function Call SetFocusAPI(my_buttonA)
  • 3. '******** Calling API Function ********** Call PostMessage(my_buttonA, BM_CLICK, 0&, 0&) 'pozn. SendMessage also hits the Connect.. and pops up IT Connection Mgr 'but fails to stop itself and is still running like in some loop? '*** Calling API Function, all over again for the next IT Connection Mgr Win Application.Wait (Now + TimeValue("0:00:03")) my_ITConnMgrWindow = FindWindow(vbNullString, "IT Connection Manager") 'Call SetForegroundWindow(my_ITConnMgrWindow) Application.Wait (Now + TimeValue("0:00:03")) my_buttonB = FindWindowEx(my_ITConnMgrWindow, ByVal 0&, "button", "Connect") Application.Wait (Now + TimeValue("0:00:03")) 'DoEvents 'Call SetFocusAPI(my_buttonB) Call PostMessage(my_buttonB, BM_CLICK, 0&, 0&) 'mozny zpusob: 'Call PostMessage(my_buttonB, WM_LBUTTONDOWN, 0&, 0&) 'Call PostMessage(my_buttonB, WM_LBUTTONUP, 0&, 0&) Application.Wait (Now + TimeValue("0:00:03")) my_Connect_ITConnMgrWindow = FindWindow(vbNullString, "Connect IT Connection Manager") '*password my_editBox = FindWindowEx(my_Connect_ITConnMgrWindow, ByVal 0&, "edit", "") my_buttonC = FindWindowEx(my_Connect_ITConnMgrWindow, ByVal 0&, "button", "OK") 'DoEvents 'Call SetFocusAPI(my_buttonB) PIN = "112233" For i = 1 To Len(PIN) Call PostMessage(my_editBox, WM_CHAR, Asc(Mid(PIN, i, 1)), 0&) Next i Call PostMessage(my_buttonC, BM_CLICK, 0&, 0&) End Sub