Jump to content

Recommended Posts

  • Moderators
Posted

Moved to the appropriate AutoIt General Help and Support forum, as the AutoIt Example Scripts forum very clearly states:

Quote

Share your cool AutoIt scripts, UDFs and applications with others.


Do not post general support questions here, instead use the AutoIt Help and Support forums.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted (edited)
#include <Excel.au3>
#include <Constants.au3>

Global Const $START = 2  ; E1<========= starting row to begin reading from your excel sheet

; Create application object and open an example workbook
Global $oExcel = _Excel_Open()
$oWorkbook = _Excel_BookOpen($oExcel, @ScriptDir & "\Book1.xls")
If @error Then Exit MsgBox($MB_SYSTEMMODAL, "", "Error opening Book1.xls")

Global $iLastRow = $oWorkbook.ActiveSheet.Usedrange.Rows.Count

Global $aList = _Excel_RangeRead($oWorkBook, Default, "E" & $START & ":E" & $iLastRow) ; Read column E from START to end
If @error or Not IsArray($aList) Then Exit MsgBox($MB_OK, "Error", "unable to read column from excel sheet")
_ArrayDisplay($aList) ; Display content of column E

HotKeySet("{PGDN}", CopyNextCell)  ; PageDown to copy next cell into your other app
HotKeySet("^+{END}", Terminate)    ; ctrl-shift-end to exit your script

While Sleep(100)
WEnd

Func Terminate()
  Exit
EndFunc

Func CopyNextCell()
  Local Static $iPos = 0
  Local $hWnd = WinActivate("[CLASS:Notepad]") ; https://www.booking2.sellingplatformconnect.amadeus.com/
  If Not $hWnd Then Exit MsgBox($MB_OK, "Error", "Application not loaded")
  WinWaitActive($hWnd)

  Send("^a{DEL}" & $aList[$iPos])
  ;ControlSetText($hWnd, "", "Your control name here", $aList[$iPos]) ; LOT better but you need to find the control with au3info.exe
  $iPos += 1
  If $iPos > $iLastRow - $START Then Exit MsgBox($MB_OK, "Warning", "Last row reached, exiting script")
EndFunc

 

 

Edited by ioa747

I know that I know nothing

Posted

Hi IOA747,

Thanks for editing codes. Full original code credit for solution goes to MVP "Nine".

initially , Code did not worked, so attempted to learn  by myself on YouTube  Google, realised its a requires deep knowledge.

Edited code opens Excel file but is motion less for next step for  copying cell content and  pasting on Open Website , probably Edge security is preventing, 

Any suggestion /recommendation  for other browsers?

Thanks

 

Posted

@NINE, 

Thanks for suggestion,  UDF getting more complex now...for me it's like not knowing simple addition attempting to learn calculus!

Appreciate your help here again, web page is already open (https://www.booking2.sellingplatformconnect.amadeus.com/app_sell2.0/apf/init/login?SITE=LOGINURL&LANGUAGE=GB&e=j&OFC=SYDA82737) in Chrome or Edge 

suggestion by  ioa747  opens excel file and no further activity, just stop 

Thanks

 

Posted
1 hour ago, ANSHQ01 said:

suggestion by  ioa747  opens excel file and no further activity, just stop


_ArrayDisplay with data from column E is not displayed?

and if you took a look at the code you'll notice that I've changed the link since I didn't have access to it
with the Notepad window so if you have Notepad open and press the {PGDN} (page down shortcut) it will transfer the data to Notepad
like you did with the this page, have you tried?
 

I know that I know nothing

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...