Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
339 views
in Technique[技术] by (71.8m points)

powershell - How to create a job queue where each queued job goes to a listbox and can be processed after clicking on a button?

I've been reading a lot about creating queues, etc, but I think I haven't found an answer to what I need. My script is personal and it's not about pc internal processes. It is for multimedia stuff.

First of all, here is my GUI: text

That's not part of the question, but, do you know how "unselect" the first combobox? .SelectionStart = 0 and .SelectionLength = 0 are set, but I'd like to have the whole combobox not selected from the start (plus, it's readonly).

Ok, now the thing: I've made a working script (well, I have to finish it with one more thing I want it to do, but for a first version I'm happy with it) that starts when I click on "Procesar" (button 2). So here is what I'd love to do: #1.add_click: get every input and create a new job that it's displayed in the listbox (number 3), without processing anything #2.add_click: process the script normally. Just 1 job at a time, getting the inputs introduced. That's the only thing I have for now. #3: Display every job added to the "queue". It would be SUPER COOL that if I close the script, the next time I open it, the list keeps everything in it. #4.add_click: process the selected item with the inputs I introduced when I added the "job" to the "queue" #5.add_click: delete selected item. I've done it like this:

$cola_trabajos.Items.Remove($cola_trabajos.SelectedItem)

#6.add_click: that sould process every item in the list one after another starting from index 0

FYI: When I started asking this question I realized I needed more buttons, that was my GUI a few hours ago after managing to get it working before asking anything! text

question from:https://stackoverflow.com/questions/65647591/how-to-create-a-job-queue-where-each-queued-job-goes-to-a-listbox-and-can-be-pro

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...