Jump to content

Recommended Posts

Posted

I'm new at programming, is it possible to write a program that could reference an excel, csv (any file type) on your GUI, so when you press a button it would display that information.

Explained:

Say you are making an On Call schedule for your 3 employee's - each person is on call at different times of the day:

  • Person 1 - 8am - 4pm
  • Person 2 - 5pm - 9pm
  • Person 3 - 10pm - 3am
They are located in an excel file. The GUI would have a button to when you click on the button it would take the current time and display (inside the GUI or msg box) who would be on call based on the time. Is this program possible? If so please help! I'm lost on how I could start and have been researching.

Thanks

Posted

This should you get started.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Maybe its because I'm really tired - how could I use that function to relate off an excel spreadsheet (or something) to display the information I need according to the time?

Posted (edited)

Not exactly what you wanted, but still could be of great help for a starter.

_CallOfDuty()

Func _CallOfDuty()
$HOUR = @HOUR
If $HOUR >= 8 AND $HOUR <= 16 then msgbox(64, 'Your dearest PC says:', 'I think person-1 on duty for now.')
If $HOUR >= 17 AND $HOUR <= 21 then msgbox(64, 'Your dearest PC says:', 'I think person-2 on duty for now.')
If $HOUR >= 22 OR $HOUR <= 3 then msgbox(64, 'Your dearest PC says:', 'I think person-3 on duty for now.')
EndFunc

WHAT IT DOES? It'll display a message telling which person should be on-duty at the time when it is opened. I leave dealing with CSV part for others. I'm too lazy for it.

Good luck with your app.

Edited by MKISH

----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Posted

First you need to read the data form a Excel workbook. Use the Excel UDF that comes with AutoIt. Functions _ExcelBookOpen and _ExcelReadCell or _ExcelReadSheetToArray will do what you need

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

You either read the whole sheet into an array and then search for the relevant content. Or you search in Excel for one of the header lines and then read the needed cells.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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
×
×
  • Create New...