Hi,I am new to VBScript, I am trying to get all the printers status on a network. Is there a script to do that? thank youRead more

Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use Counter if you want to do multiple count of the list from collections import Counter list = ['Jones','Adams','Frank','John','Lopez','Jones','Smith','Ivan','Julian','Carlos','Adams','Frank','Jones','John','Ivan'] print(Counter(list)) Result: Counter({'Jones': 3, 'Adams': 2, 'Frank': 2, 'JRead more
You can use Counter if you want to do multiple count of the list
[crayon-67ce734cb7b39255566636/]
Result:
[crayon-67ce734cb7b3e800390328/]
Hello, Is there a solution to check if fanuc robot is in motion? I want to share this inormation with PLC. thanks for help.
Hi, In system variables you can find this variable: $MOR_GRP[1].$ROB_MOVE To share the state of robot is moving you can use a an output in a routine executed in a background logic. For example : DO[100] = $MOR_GRP[1].$ROB_MOVE Run this program in background logic: The output DO[100] will be updatedRead more
Hi,
In system variables you can find this variable:
$MOR_GRP[1].$ROB_MOVE
To share the state of robot is moving you can use a an output in a routine executed in a background logic.
For example :
DO[100] = $MOR_GRP[1].$ROB_MOVE
Run this program in background logic:
The output DO[100] will be updated and will get the robot motion status.
I hope this help you.
See less
Hello, I am not familiar with fanuc robot. I am trying to run a program from background logic. I have a R30iB Fanuc Controller with an RSR001 which run continuously. In the program WAITDI, an instruction to wait the state of DI[10]. If its ON, I want to call a program to put the robot to a home position tought in the ...Read more
You can't use a wait instruction in a routine called in background logic You can't call a program in a background logic. what are you trying to acheive exactly? Please explain what's the goal of your application
You can’t use a wait instruction in a routine called in background logic
You can’t call a program in a background logic. what are you trying to acheive exactly?
Please explain what’s the goal of your application
See lessI have an excel files which contains many sheets. for evey sheet, the name is equal to name of student. How Sort worksheets by alphabet using vba Excel? thank you
hello, try this code it will help you: Private Sub CommandButton1_Click() Application.ScreenUpdating = False 'disable screen update for performance Dim i, j As Integer Dim SheetsCount As Integer SheetsCount = Sheets.Count For i = 1 To SheetsCount - 1 For j = i + 1 To SheetsCount If Sheets(j).NameRead more
Hi I have two lists list1 and list2 I want to extract all values that exist in list1 and don’t exist in list2. I tried this code: Read more
You can simly use a for loop with append to list. list1 = ['lion', 'dog', 'cat', 'tiger', 'cat', 'cat', 'zebra'] list2 = ['monkey', 'tiger', 'cow', 'mouse'] my_list = [] for animal in list1: #iterating over list1 if animal not in list2 and animal not in my_list: my_list.append(animal) #add item to tRead more
You can simly use a for loop with append to list.
[crayon-67ce734cb7ec1930398456/]
[crayon-67ce734cb7ec5814492582/]
kind regards
See lessPlease login to vote and see the results.
Which sentence is correct to use ?:“If I was” or “If I were”? or Both are correct
Please login to vote and see the results.
What is your greatest weakness in english? You can choose multiple answers.
Hi I have a variables that is declared outsides fucntions. How can I use and change these variables inside function usign Python? thank you
Follow this example to create a variable outside functions, and use it inside the functions: MyVariable = 99 #this is a global variable def changeAndPrint_GlobalVariable(): global MyVariable #use global variable in this function with "global" keyword print('Global variable "MyVariable" before changeRead more
Follow this example to create a variable outside functions, and use it inside the functions:
[crayon-67ce734cb805a100980452/]
This code will print:
[crayon-67ce734cb805f909026959/]
Hello this code may help you: def flatten_list(original_List): flat_list = [] for sub_list in original_List: for element in sub_list: flat_list.append(element) return flat_list #test original_List=[['a', 'b', 'c', 'd','e'], ['f', 'g', 'h', 'i'], ['j', 'k', 'l'], ['m', 'n', 'o']] print('original listRead more
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
here is the code if you need to check if a printer is connected to nework: Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Printer WHERE Name = 'HP DeskJet 2720E'") For Each objItem in colItems If objItem.Network = True Then WScripRead more
here is the code if you need to check if a printer is connected to nework:
[crayon-67ce734cb7738701765186/]
This script uses the Windows Management Instrumentation (WMI) service to query for printers with the name “HP DeskJet”. It then checks the value of the
Network
property for each printer to determine whether it is connected to the network. If theNetwork
property isTrue
, the script outputs a message indicating that the printer is connected to the network. If theNetwork
property isFalse
, the script outputs a message indicating that the printer is not connected to the network.I hope this helps!
See less