mirror of
				https://github.com/gnh1201/welsonjs.git
				synced 2025-10-30 20:41:18 +00:00 
			
		
		
		
	Update winlibs.js
This commit is contained in:
		
							parent
							
								
									8c307807ed
								
							
						
					
					
						commit
						45465d12e3
					
				|  | @ -21,21 +21,30 @@ exports.loadLibrary = function(LIB) { | ||||||
|     }; |     }; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| exports.openControlPanel = function(name, args) { | exports.openControlPanel = function(name, applets, args) { | ||||||
|     var shell32 = exports.loadLibrary("shell32"); |     var shell32 = exports.loadLibrary("shell32"); | ||||||
|  |     var _applets = []; | ||||||
|     var _args = []; |     var _args = []; | ||||||
|      |      | ||||||
|     _args.push(name + ".cpl"); |     // write a applets section
 | ||||||
| 
 |     _applets.push(name + ".cpl"); | ||||||
|     if (typeof(args) !== "undefined") { |     if (typeof(applets) !== "undefined") { | ||||||
|         for (var i in args) { |         for (var i in applets) { | ||||||
|             _args.push(args[i]); |             _applets.push(applets[i]); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     // write a args section
 | ||||||
|  |     _args.push(_applets.join(',')); | ||||||
|  | 
 | ||||||
|  |     // run command
 | ||||||
|     return shell32.call("Control_runDLL", _args); |     return shell32.call("Control_runDLL", _args); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| exports.openNetworkControlPanel = function() { | exports.openTimezonePanel = function() { | ||||||
|  |     return exports.openControlPanel("desk", ["@0", 1]); | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | exports.openNetworkPanel = function() { | ||||||
|     return exports.openControlPanel("ncpa"); |     return exports.openControlPanel("ncpa"); | ||||||
| }; | }; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 GitHub
							GitHub