Search found 18 matches

by thatsameer
Thu Apr 18, 2019 6:07 am
Forum: PowerShell GUIs
Topic: How to select focus into current tab of TabControl
Replies: 4
Views: 3875

Re: How to select focus into current tab of TabControl

Nice one, thanks. I'm very nearly there. Instead of naming the tab page (as all my tabs have the same name), I can use the tab number e.g. $tabcontrol1.SelectedTab = $tabcontrol1.TabPages[1] [System.Windows.Forms.SendKeys]::SendWait("{F5}") Very nearly there now... How can I make the tab n...
by thatsameer
Thu Apr 18, 2019 4:11 am
Forum: PowerShell GUIs
Topic: How to select focus into current tab of TabControl
Replies: 4
Views: 3875

How to select focus into current tab of TabControl

Hi, Before I begin i would like to thank everyone on Sapien Forums. I have a tabcontrol with tabs. I can refresh the tab I'm on by mouse clicking in the tabs window and pressing F5. I can also go to the next tab plus refresh the tab page with the navigation button: $buttonNext_Click={ if($tabcontrol...
by thatsameer
Tue Feb 19, 2019 6:16 am
Forum: PowerShell GUIs
Topic: Loop cycle through tabcontrol tabs
Replies: 7
Views: 2115

Re: Loop cycle through tabcontrol tabs

The code cycles through the tabs successfully. But the tab contents do not display, and the GUI is unclickable while the loop is running. Only once the tab have completed it's cycle does it show the page it finished on.

I would like to see each tab and tab contents one by one in a loop
by thatsameer
Tue Feb 19, 2019 2:29 am
Forum: PowerShell GUIs
Topic: Loop cycle through tabcontrol tabs
Replies: 7
Views: 2115

Re: Loop cycle through tabcontrol tabs

Thanks for this. It works in terms of it cycles through the tabs however whilst cycling, the content of the tabs do not display as it seems while the process is running it locks up the form until its over... I hope this makes sense? Please try recreating to see issue i am having if not clear. many t...
by thatsameer
Mon Feb 18, 2019 1:55 pm
Forum: PowerShell GUIs
Topic: Loop cycle through tabcontrol tabs
Replies: 7
Views: 2115

Loop cycle through tabcontrol tabs

Hi, I have managed to successfully add new tabs to a form for each URL listed in a text file. This is what it looks like: cycleloop.PNG I have added button1 as what I would like is for the tabs to cycle through in a loop, staying on each tab for lets say 5 seconds. I have tried this: $button1_Click ...
by thatsameer
Mon Feb 18, 2019 1:19 pm
Forum: PowerShell
Topic: Add one variable to another loop
Replies: 4
Views: 2144

Re: Add one variable to another loop

Thanks, your replies allowed me to probe further. I've solved this in a clever way, by creating a new tab for each line in the notepad, adding to the form and adding webbrowser on top. Works very well. I have another question on the tabcontrol but will post new topic as not very related to this one....
by thatsameer
Mon Feb 18, 2019 7:56 am
Forum: PowerShell
Topic: Add one variable to another loop
Replies: 4
Views: 2144

Re: Add one variable to another loop

Im sorry but I still don't understand how to make each line from text file .navigate to each sequential $webbrowserX
by thatsameer
Mon Feb 18, 2019 6:50 am
Forum: PowerShell
Topic: Add one variable to another loop
Replies: 4
Views: 2144

Add one variable to another loop

Hi, Im very confused. I've read the webbrowser help but haven't got anywhere. Here is my situaton: I have 2 WebBrowser objects placed in my Sapien form ($webbrowser1 and $webbrowser 2). I have a list of links in c:\users\admin\desktop\url.txt (https://google.co.uk and https://bbc.co.uk). I want each...
by thatsameer
Mon Jan 21, 2019 3:18 am
Forum: PowerShell
Topic: Launch IE tabs based on TXT file
Replies: 6
Views: 4068

Re: Launch IE tabs based on TXT file

Hi, Thanks for the reply. This doesn't solve my issue. The issue is, I want to specify the URLs in a text file as the screenshot above. I do not want to hardcode the URLs in the script - only to point to a txt file containing the URLs so can modify freely. However, asking IE to open with the URLs in...
by thatsameer
Mon Jan 21, 2019 2:38 am
Forum: PowerShell
Topic: Launch IE tabs based on TXT file
Replies: 6
Views: 4068

Launch IE tabs based on TXT file

Hi, Using powershell to launch a browser and open a defined set of URLs from a notepad: $url = Get-Content C:\Users\xadmin\Documents\Dashboard\URL.txt Start-Process -FilePath "chrome.exe" -ArgumentList $url This is the contents of the txt file: notepadtxt.png This works perfectly and as ex...