Jump to content
Sign in to follow this  
minxomat

StringAPL UDF - Powerful calculations, Minimal code

Recommended Posts

minxomat

Hi there.

 

Abstract

 

This UDF enables the use of all reference APL features in AutoIt. Is uses the original APL symbols. The code is interpreted via a sandbox ngn-apl interface which relies on JavaScript. Execution is done via IE objects.

 

What's APL?

 

APL is a formal, imperative language. Because it is imperative, a sentence may be called an instruction, and may be executed to produce a result. StringAPL() has one main parameter, which is the APL source code. Thus:

 

 

StringAPL("2×(3+4)") = "14"

Unlike traditionally structured programming languages, code in APL is typically structured as chains of monadic or dyadic functions and operators acting on arrays. As APL has many nonstandard primitives (functions and operators, indicated by a single symbol or a combination of a few symbols), it does not have function or operator precedence.

 

The APL environment is called a workspace. In a workspace the user can define programs and data, i.e. the data values exist also outside the programs, and the user can manipulate the data without the necessity to define a program. For example,

 

 

StringAPL("N ← 4 5 6 7")

will initialize a vector "N" containing 4 elements according to the command. After each StringAPL call, the workspace is deleted completely, so you have to use multi-instructions if you want to reuse macros, functions or variables. Now that we have "N" we can manipulate it. Here's just a small example, you can do much more with APL (later more):

 

 

N+4

Will perform an addition. Every element in N is increased by (int)4. Easy, at least for now ;-)

 

What's possible?

 

Everything. If you feel like it, just draw a mandelbrot fractal using only one line 'o code. Or solve the n-Queen problem, or determine the first hundred prime numbers, or parse a html file. APL is like RegEx on crack. Some really advanced examples are included within the example file.

 

Now, why isn't APL more popular?

 

Because it uses a very, very strange charset. In fact, you have to install the APL Unicode font (https://sites.google.com/site/baavector/fonts) and set SciTe to use this font (CTRL+1 -> Change Monospace Font), before you can even view the examples! In addition to that, you scripts have to be UTF8 BOM encoded, which in return causes Au3Check to crash whenever custom includes are used. I'm planning on replacing the APL chrs with hum-readable english commands, but that may take some time :-)

 

Just look at the mandelbrot drawing code, it's absolutely ridiculous!:

apltestb773.png

 

I'd call it abstract art :D .

 

Examples

 

There are a few examples included. For the basic stuff please visit the Wikipedia APL page und Wikipedia APL reference:

 

examplese923.png

 

Remarks

 

Please do not use the second parameter yet, it is unfinished and experimental. Also, to use multiline-code, use . in-command to start a new line, just like the examples.

 

Download

 

Example file (INSTALL APL FONT AND ENCODE UTF8BOM!!!)

UDF (doesn't need any special treatment, doesn't contain APL chrs)

https://github.com/Perseus-Developers/StringAPL

 

Does not work in 3.3.9.5. Developed in 3.3.8.1. No further testing, please report bugs only if they occur in a stable version.

Edited by minx
  • Like 1

I will answer every single PM, and you are free to ask anything anytime.

Share this post


Link to post
Share on other sites
jchd

Very nice!

You have all APL specific characters in the DejaVu Sans Mono (it is perfect for most fixed-pitch uses, e.g. editors).

  • Like 1

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites
mLipok

I just reading about APL

here is some intresting links:

http://forum.apl2000.com/viewtopic.php?f=28&t=942

edit:

http://www.chilton.com/~jimw/setgame.html

edit2:

btw. works on 3.3.10.2 and 3.3.13.19

Edited by mLipok

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library
 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-10-15

Share this post


Link to post
Share on other sites
minxomat

Is that font really certified? I didn't try every single one, but most of them seem to have problems with some characters (such as downstile etc.). But if it works: great!

@mLipok Great tutorial here, too: http://www.jsoftware.com/papers/APLDictionary1.htm , also features a great reference.

Edited by minx

I will answer every single PM, and you are free to ask anything anytime.

Share this post


Link to post
Share on other sites
jchd

One of my first freelance projects was on an IBM 5120 APL... Never worked with APL since but this is a good occasion to start learning the function set again, well if free time permits.

Anyway for those curious enough, this may add significant computing power to AutoIt. I wonder if it would be possible to skip html + IE and launch the .js directly.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites
jchd

minx,

You're right. There are some functional symbols missing (represented by a thin square), at least in the version I have. I'll try to find a more complete version.

 


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites
minxomat

Yes, you are right, the bottleneck is IE. Actually, you can spot a google.com tag in the code. This is to bypass the ActiveX filter. But the Site still has to go trough that filter. I think a 3rd party JS compiler will do the job.

Sadly, MS' ScriptControl stopped JS support at version 1.2, so this won't work.


I will answer every single PM, and you are free to ask anything anytime.

Share this post


Link to post
Share on other sites
mLipok

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API Forum Rules *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library
 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-10-15

Share this post


Link to post
Share on other sites
minxomat

It isn't limited to math, though. Also, a short description would seem to be helpful (inline APL interpreter or so).


I will answer every single PM, and you are free to ask anything anytime.

Share this post


Link to post
Share on other sites
jchd

minx,

I believe you should have mentionned "steepest_learning_curve_language_ever" in the keyword list of your post :mad2:

More seriously I checked the DejaVu site and the last snapshot has a version of DejaVu Sans Mono where all APL symbols defined in Unicode are available (and look correct AFAICT). I don't know which subset implemented in apl.js but that font should cover all practical uses.

I downloaded dejavu-fonts-ttf-2.34-20140118-2580.zip and all worked like a charm. I don't have the setup to compile from latest sources but it doesn't make a big difference for me: work in (slow) progress is on fixing kernings, adding ideographs I can't name and details that don't prevent me from sleeping well.

In SciTE I can see all these 70 APL symbols:

02336    ⌶    APL FUNCTIONAL SYMBOL I-BEAM
02337    ⌷    APL FUNCTIONAL SYMBOL SQUISH QUAD
02338    ⌸    APL FUNCTIONAL SYMBOL QUAD EQUAL
02339    ⌹    APL FUNCTIONAL SYMBOL QUAD DIVIDE
0233A    ⌺    APL FUNCTIONAL SYMBOL QUAD DIAMOND
0233B    ⌻    APL FUNCTIONAL SYMBOL QUAD JOT
0233C    ⌼    APL FUNCTIONAL SYMBOL QUAD CIRCLE
0233D    ⌽    APL FUNCTIONAL SYMBOL CIRCLE STILE
0233E    ⌾    APL FUNCTIONAL SYMBOL CIRCLE JOT
0233F    ⌿    APL FUNCTIONAL SYMBOL SLASH BAR
02340    ⍀    APL FUNCTIONAL SYMBOL BACKSLASH BAR
02341    ⍁    APL FUNCTIONAL SYMBOL QUAD SLASH
02342    ⍂    APL FUNCTIONAL SYMBOL QUAD BACKSLASH
02343    ⍃    APL FUNCTIONAL SYMBOL QUAD LESS-THAN
02344    ⍄    APL FUNCTIONAL SYMBOL QUAD GREATER-THAN
02345    ⍅    APL FUNCTIONAL SYMBOL LEFTWARDS VANE
02346    ⍆    APL FUNCTIONAL SYMBOL RIGHTWARDS VANE
02347    ⍇    APL FUNCTIONAL SYMBOL QUAD LEFTWARDS ARROW
02348    ⍈    APL FUNCTIONAL SYMBOL QUAD RIGHTWARDS ARROW
02349    ⍉    APL FUNCTIONAL SYMBOL CIRCLE BACKSLASH
0234A    ⍊    APL FUNCTIONAL SYMBOL DOWN TACK UNDERBAR
0234B    ⍋    APL FUNCTIONAL SYMBOL DELTA STILE
0234C    ⍌    APL FUNCTIONAL SYMBOL QUAD DOWN CARET
0234D    ⍍    APL FUNCTIONAL SYMBOL QUAD DELTA
0234E    ⍎    APL FUNCTIONAL SYMBOL DOWN TACK JOT
0234F    ⍏    APL FUNCTIONAL SYMBOL UPWARDS VANE
02350    ⍐    APL FUNCTIONAL SYMBOL QUAD UPWARDS ARROW
02351    ⍑    APL FUNCTIONAL SYMBOL UP TACK OVERBAR
02352    ⍒    APL FUNCTIONAL SYMBOL DEL STILE
02353    ⍓    APL FUNCTIONAL SYMBOL QUAD UP CARET
02354    ⍔    APL FUNCTIONAL SYMBOL QUAD DEL
02355    ⍕    APL FUNCTIONAL SYMBOL UP TACK JOT
02356    ⍖    APL FUNCTIONAL SYMBOL DOWNWARDS VANE
02357    ⍗    APL FUNCTIONAL SYMBOL QUAD DOWNWARDS ARROW
02358    ⍘    APL FUNCTIONAL SYMBOL QUOTE UNDERBAR
02359    ⍙    APL FUNCTIONAL SYMBOL DELTA UNDERBAR
0235A    ⍚    APL FUNCTIONAL SYMBOL DIAMOND UNDERBAR
0235B    ⍛    APL FUNCTIONAL SYMBOL JOT UNDERBAR
0235C    ⍜    APL FUNCTIONAL SYMBOL CIRCLE UNDERBAR
0235D    ⍝    APL FUNCTIONAL SYMBOL UP SHOE JOT
0235E    ⍞    APL FUNCTIONAL SYMBOL QUOTE QUAD
0235F    ⍟    APL FUNCTIONAL SYMBOL CIRCLE STAR
02360    ⍠    APL FUNCTIONAL SYMBOL QUAD COLON
02361    ⍡    APL FUNCTIONAL SYMBOL UP TACK DIAERESIS
02362    ⍢    APL FUNCTIONAL SYMBOL DEL DIAERESIS
02363    ⍣    APL FUNCTIONAL SYMBOL STAR DIAERESIS
02364    ⍤    APL FUNCTIONAL SYMBOL JOT DIAERESIS
02365    ⍥    APL FUNCTIONAL SYMBOL CIRCLE DIAERESIS
02366    ⍦    APL FUNCTIONAL SYMBOL DOWN SHOE STILE
02367    ⍧    APL FUNCTIONAL SYMBOL LEFT SHOE STILE
02368    ⍨    APL FUNCTIONAL SYMBOL TILDE DIAERESIS
02369    ⍩    APL FUNCTIONAL SYMBOL GREATER-THAN DIAERESIS
0236A    ⍪    APL FUNCTIONAL SYMBOL COMMA BAR
0236B    ⍫    APL FUNCTIONAL SYMBOL DEL TILDE
0236C    ⍬    APL FUNCTIONAL SYMBOL ZILDE
0236D    ⍭    APL FUNCTIONAL SYMBOL STILE TILDE
0236E    ⍮    APL FUNCTIONAL SYMBOL SEMICOLON UNDERBAR
0236F    ⍯    APL FUNCTIONAL SYMBOL QUAD NOT EQUAL
02370    ⍰    APL FUNCTIONAL SYMBOL QUAD QUESTION
02371    ⍱    APL FUNCTIONAL SYMBOL DOWN CARET TILDE
02372    ⍲    APL FUNCTIONAL SYMBOL UP CARET TILDE
02373    ⍳    APL FUNCTIONAL SYMBOL IOTA
02374    ⍴    APL FUNCTIONAL SYMBOL RHO
02375    ⍵    APL FUNCTIONAL SYMBOL OMEGA
02376    ⍶    APL FUNCTIONAL SYMBOL ALPHA UNDERBAR
02377    ⍷    APL FUNCTIONAL SYMBOL EPSILON UNDERBAR
02378    ⍸    APL FUNCTIONAL SYMBOL IOTA UNDERBAR
02379    ⍹    APL FUNCTIONAL SYMBOL OMEGA UNDERBAR
0237A    ⍺    APL FUNCTIONAL SYMBOL ALPHA
02395    ⎕    APL FUNCTIONAL SYMBOL QUAD
 


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites
minxomat

Then why bother downloading another font, when there is a more official fully-APL compatible font which is linked in the first post? I can't quite follow your logic there. For the testing of the symbols, just C&P the JSoftware Page I've linked (the last three tables contain the reference) and see if everything is the same. It is for the APL Unicode font (as expected).


I will answer every single PM, and you are free to ask anything anytime.

Share this post


Link to post
Share on other sites
jchd

Because the APL fonts is not a good generic programming font and it doesn't contains characters for languages other than limited Latin, limited Greek and limited Cyrillic. It lacks diacritics, modifying letters, way too many symbols and much more. I don't want to have to switch fonts in SciTE so I prefer a "one size fits all" solution.

The advantage of DejaVu Sans Mono is that many of its glyphs have been specifically designed for programming, albeit I agree that APL functionnal symbols are much better rendered in APL385 than elsewhere.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Similar Content

    • Skeletor
      By Skeletor
      Hi Virtual People,
      My array works perfectly fine. However, what is the best practice if the line in the array doesn't have the correct amount of columns and if I can add a placeholder?

       
      For $count = 1 To _FileCountLines($FileRead1) Step 1 $string = FileReadLine($FileRead1, $count) $input = StringSplit($string, ",", 1) $value1 = $input[1] $value2 = $input[2] $value3 = $input[3] _Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $value2, "A1") _Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $value1, "B1") _Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $value3, "C1") Next  
    • MrCheese
      By MrCheese
      hi all,
      reviewing the forum, this thread is applicable: 
       
       
      I wanted to know if there is now a better way to do this?
      In essence, I load a tab delimited txt file into an array (works well). I used tab, as some fields in the original csv contains commas.
      However, I needed autoit to manipulate this array, and output it as a csv.
      IF my array contains items with a comma, without double quotes around the field, then how best do I get a csv out of this?
      My current workaround is to filewritefromarray tab delimited, then open it in excel and save as a csv. I will need to check this to see how the address fields behave that contain a comma.
       
      Any thoughts would be appreciated.
       
    • ufukreis1212
      By ufukreis1212
      Hello, I am new members. Help me please. I want vbs convert to au3 .
      This vbs code : 
      'deneme Set SystemSet = GetObject("winmgmts:").InstancesOf ("Win32_OperatingSystem") strOSArch = GetObject("winmgmts:root\cimv2:Win32_OperatingSystem=@").OSArchitecture Set objNetwork = CreateObject("Wscript.Network") Set wshShell = CreateObject( "WScript.Shell" ) strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) Set oShell = WScript.CreateObject("WScript.Shell") proc_arch = oShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%") Set oEnv = oShell.Environment("SYSTEM") strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colMB = objWMIService.ExecQuery("Select * from Win32_BaseBoard") Set colCSes = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem") Set colProcessors = objWMIService.ExecQuery("Select * from Win32_Processor") Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItemsx = objWMIService.ExecQuery( _ "SELECT * FROM Win32_VideoController",,48) '------------------------------------------------------------------- Set obj = GetObject("winmgmts:").InstancesOf("Win32_PhysicalMemory") i = 1 For Each obj2 In obj memTmp1 = obj2.capacity / 1024 / 1024 TotalRam = TotalRam + memTmp1 i = i +1 Next '-------------------------------------------------------------------- Dim objWMIService : Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery("Select Architecture from Win32_Processor") For Each objItem in colItems if objItem.Architecture = 0 then strArchitecture = "x86" end if if objItem.Architecture = 9 then strArchitecture = "x64" end if next '-------------------------------------------------------------------- strComputer = "." ' Local computer strMemory = "" i = 1 set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory") For Each objItem In colItems if strMemory <> "" then strMemory = strMemory & vbcrlf strMemory = strMemory & "Bank" & i & " : " & (objItem.Capacity /1024 /1024) & " Mb" i = i + 1 Next installedModules = i - 1 Set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray") For Each objItem in colItems totalSlots = objItem.MemoryDevices Next '---------------------------------------------------------------------- Set objWMISvc = GetObject( "winmgmts:\\.\root\cimv2" ) Set colItems = objWMISvc.ExecQuery( "Select * from Win32_ComputerSystem" ) For Each objItem in colItems strComputerDomain = objItem.Domain Next for each System in SystemSet For Each objItem in colItemsx For Each objProcessor in colProcessors For Each bbType In colMB MbVendor = bbType.Manufacturer MbModel = bbType.Product MsgBox "İşletim Sistemi : " & System.Caption & vbNewLine & _ "İşletim Sistemi Versionu : " & + System.Version & vbNewLine & _ "Windows Mimari Yapısı: " & strOSArch & vbNewLine & _ "Kullanıcı isminiz: " & objNetwork.UserName & vbNewLine & _ "Bilgisayar ismi: " & strComputerName & vbNewLine & _ "Çalışma Grubu: " & strComputerDomain & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "Anakart: " & MbVendor & " " & "[" & MbModel & "]" & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "Grafik Kartı: " & objItem.Caption & vbNewLine & _ "Driver Version: " & objItem.DriverVersion & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "İşlemci Üreticisi: " & objProcessor.Manufacturer & vbNewLine & _ "İşlemci İsmi: " & objProcessor.Name & vbNewLine & _ "CPU Mimarisi: " & strArchitecture & vbNewLine & _ "İşlemci Çekirdek sayısı: " & oEnv("NUMBER_OF_PROCESSORS") & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "Toplam RAM: " & TotalRam & " MB" & vbNewLine & _ "Toplam Slot: " & totalSlots & vbNewLine & _ "Boş Slot: " & (totalSlots - installedModules) & vbNewLine & _ "Ramlerin bulunduğu slotlar:" & vbcrlf & strMemory,0,"deneme" Next Next Next Next please help me , thanks.
    • caramen
      By caramen
      I watched _OL_ItemSend&_OL_ItemFind&_OL_ItemCreate in OutlookEx UDF but hmmm
       
      Since it use the test environnement i cant get the orders of the mail creation
       
      Can someone make me win some time of reading all exemples script and lead me how to do one ?
      That whould be lovely.
      Gnight
    • JuanFelipe
      By JuanFelipe
       
      Hello friends, I have a query, it happens that I have a matrix nxn, the first column of this contains each cell a number with 21 digits, when I pass this matrix to Excel I obviously write that number as 1,10016E + 20, I solved it by adding a * at the end of each cell, but I want it to be written as a text so that I do not have to remove that *, I searched in Google but could not find an effective solution, thanks in advance. 
×