zt4h8 ekky6 a5as8 hi8f3 k5rf4 zai9a 4zts7 s2f6f b6abk 8iz6t kei4k annkk nb97y 6nfbf rearf nnt9f bknnb 4rrd4 5s65n rz4z3 8b69s My script will call a powershell script on my home computer but not my work computer. |

My script will call a powershell script on my home computer but not my work computer.

2022.01.21 20:36 bvttfvcker My script will call a powershell script on my home computer but not my work computer.

Hello all,
(This is the part where I tell you my life's story and share my love for rustic art, autumn leaves, old barns, etc.. Please feel free to skip to problem statement and code)
I thank you all for your time here. This is my second time ever writing .VBS, my first being to open cmd and using send.keys to spam commands to accomplish things like loading binaries and changing filenames over FTP.
*Problem Statement*
My script works as follows at home: This script finds a location and event (X, Y, (event)) from a mousecords.csv and moves the mouse to that location, and based on the (event) tag either clicks, double-clicks, copy, paste, or inserts text looped from a different .csv called workorders.csv
What's happening when I take it to my work is that it will move the mouse to the right location, then nothing (I think cmd is not opening to call the powershell script.)
I also realize this is not a powershell subreddit. I'm going to post in the correct place to try and figure out the other issue of why the clicking action that's done through is not working. I'll post everything here anyway in case someone wants a go at it.
Again, I appreciate your time :)
****main.vbs****
dim fs,objTextFile,ExcelApp,f,fso,log,conta,datos,shell,api,cmd,may,objShell,objFSO,objFile,strPath,strCMD,strPath2,arrStr,arrStr2,x,y,z,a,b
set fs=CreateObject("Scripting.FileSystemObject")
set fso=createobject("Scripting.FileSystemObject")
Set ExcelApp=CreateObject("Excel.Application")
Set objShell=CreateObject("WScript.Shell")
Set Shell=CreateObject( "WScript.Shell" )
Set objFSO=CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
set objTextFile2 = fs.OpenTextFile("workorders.csv")

Set Excel = WScript.CreateObject("Excel.Application")

strPath="clickrecord.ps1"
strPath2="doubleclickrecord.ps1"

' I actually don't remember why this variable is here right now. Ignore a, will come back to later.
a = 0

Do while NOT objTextFile2.AtEndOfStream
set objTextFile = fs.OpenTextFile("mousecords.csv")
Do while NOT objTextFile.AtEndOfStream
arrStr = split(objTextFile.ReadLine,",")
x = arrStr(0)
y = arrStr(1)
z = arrStr(2)
' arrStr is now an array that has each of your fields
' process them, whatever.....
Excel.ExecuteExcel4Macro ( _
"CALL(""user32"",""SetCursorPos"",""JJJ""," & x & "," & y & ")")
Select Case z
Case 0
' ***CLICK***
WScript.Sleep (25)
If objFSO.FileExists(strPath) Then
'return short path name
set objFile=objFSO.GetFile(strPath)
strCMD="powershell -nologo -command " & Chr(34) & "&{" &_
objFile.ShortPath & "}" & Chr(34)
' Uncomment next line for debugging
' WScript.Echo strCMD
' use 0 to hide window
objShell.Run strCMD,0
Else

'Display error message
WScript.Echo "Failed to find " & strPath
WScript.Quit
end if

Case 1
' ***DOUBLE-CLICK***
WScript.Sleep (25)
If objFSO.FileExists(strPath2) Then
'return short path name
set objFile=objFSO.GetFile(strPath2)
strCMD="powershell -nologo -command " & Chr(34) & "&{" &_
objFile.ShortPath & "}" & Chr(34)
' Uncomment next line for debugging
' WScript.Echo strCMD
' use 0 to hide window
objShell.Run strCMD,0
Else

'Display error message
WScript.Echo "Failed to find " & strPath
WScript.Quit
end if

Case 2
' ***COPY***
WScript.Sleep (25)
If objFSO.FileExists(strPath) Then
'return short path name
set objFile=objFSO.GetFile(strPath)
strCMD="powershell -nologo -command " & Chr(34) & "&{" &_
objFile.ShortPath & "}" & Chr(34)
' Uncomment next line for debugging
' WScript.Echo strCMD
' use 0 to hide window
objShell.Run strCMD,0
Else

'Display error message
WScript.Echo "Failed to find " & strPath
WScript.Quit
end if
WScript.Sleep (25)
WshShell.SendKeys "^c"

Case 3
WScript.Sleep (25)
If objFSO.FileExists(strPath) Then
'return short path name
set objFile=objFSO.GetFile(strPath)
strCMD="powershell -nologo -command " & Chr(34) & "&{" &_
objFile.ShortPath & "}" & Chr(34)
' Uncomment next line for debugging
' WScript.Echo strCMD
' use 0 to hide window
objShell.Run strCMD,0
Else

'Display error message
WScript.Echo "Failed to find " & strPath
WScript.Quit
end if
WScript.Sleep (25)
WshShell.SendKeys "^v"

Case 4
WScript.Sleep (25)
If objFSO.FileExists(strPath) Then
'return short path name
set objFile=objFSO.GetFile(strPath)
strCMD="powershell -nologo -command " & Chr(34) & "&{" &_
objFile.ShortPath & "}" & Chr(34)
' Uncomment next line for debugging
' WScript.Echo strCMD
' use 0 to hide window
objShell.Run strCMD,0
Else

'Display error message
WScript.Echo "Failed to find " & strPath
WScript.Quit
end if
WScript.Sleep (25)
arrStr2 = split(objTextFile2.ReadLine,",")
b = arrStr2(0)
WshShell.SendKeys b
a = a + 1
Case Else
Console.WriteLine("Not Known")
End Select
WScript.Sleep (1000)
' arrStr is now an array that has each of your fields
' process them, whatever.....
Loop
Loop

WScript.Sleep (1000)
WScript.Echo "Program Ended"


****Click.ps1****
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$signature=@'
[DllImport("user32.dll",CharSet=CharSet.Auto,CallingConvention=CallingConvention.StdCall)]
public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo);
'@
$SendMouseClick = Add-Type -memberDefinition $signature -name "Win32MouseEventNew" -namespace Win32Functions -passThru
$x
$y
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
sleep -Seconds 0.1
$SendMouseClick::mouse_event(0x00000002, 0, 0, 0, 0);
$SendMouseClick::mouse_event(0x00000004, 0, 0, 0, 0);

****doubleclick.ps1****
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$signature=@'
[DllImport("user32.dll",CharSet=CharSet.Auto,CallingConvention=CallingConvention.StdCall)]
public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo);
'@
$SendMouseClick = Add-Type -memberDefinition $signature -name "Win32MouseEventNew" -namespace Win32Functions -passThru
$x = [System.Windows.Forms.Cursor]::Position.X
$y = [System.Windows.Forms.Cursor]::Position.Y
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
sleep -Seconds 0.1
$SendMouseClick::mouse_event(0x00000002, 0, 0, 0, 0);
sleep -Seconds 0.05
$SendMouseClick::mouse_event(0x00000004, 0, 0, 0, 0);
sleep -Seconds 0.05
$SendMouseClick::mouse_event(0x00000002, 0, 0, 0, 0);
sleep -Seconds 0.05
$SendMouseClick::mouse_event(0x00000004, 0, 0, 0, 0);
sleep -Seconds 0.05

****
submitted by bvttfvcker to vbscript [link] [comments]


2022.01.21 20:36 Ditch_the_DeepState HSBC Bank moved 4 tonnes of GOLD OUT OF THE VAULT. That is 2% of their comex total. And BofA continues stopping (buying) January gold and silver contracts.

HSBC Bank moved 4 tonnes of GOLD OUT OF THE VAULT. That is 2% of their comex total. And BofA continues stopping (buying) January gold and silver contracts. BofA stopped (bought) 83 of the 85 gold contracts that issued delivery notices. Scotia Bank's house account issued 66 of those, so it is mostly banks passing metal around.
And in silver Scotia Bank issued 52 of the 72 and BofA only bought 26 of the 72. First time in a while BofA wasn't the majority purchaser. Silver issues and stops report shown below:

https://preview.redd.it/g96zc9eeh4d81.png?width=700&format=png&auto=webp&s=34d12a659ac12ad83ae0de530599274915ee948d
The comex vaults had a truckload come in and one out (of JP Morgan) which mostly cancelled:

https://preview.redd.it/62c99k1lg4d81.png?width=937&format=png&auto=webp&s=1bec7b3f3c6d57d61b1797736352715aa3fab747
SLV didn't report as of yet. Occasionally they take the day off. Or maybe it'll just be late today.
submitted by Ditch_the_DeepState to Wallstreetsilver [link] [comments]


2022.01.21 20:36 LumpyAd7650 Hunter macro

Is it possible to make a macro for hunters "Disengage" spell, where I would instantly turn around for 180 degrees and th3n use disengage, effectively leaping forwards with regards to the primary position?
submitted by LumpyAd7650 to wownoob [link] [comments]


2022.01.21 20:36 IsItArtThough Sketching the royal fam 🥰

Sketching the royal fam 🥰 submitted by IsItArtThough to beyonce [link] [comments]


2022.01.21 20:36 KissingBanditress My 5-point star building project, but kinda lost how to continue with it... any suggestions? (no mods, just devcommands and debugmode)

My 5-point star building project, but kinda lost how to continue with it... any suggestions? (no mods, just devcommands and debugmode) submitted by KissingBanditress to valheim [link] [comments]


2022.01.21 20:36 PopYoShitTwin Durk and Youngboy Trending #1 on Twitter

Durk and Youngboy Trending #1 on Twitter submitted by PopYoShitTwin to NBAYoungboy [link] [comments]


2022.01.21 20:36 xtreme_sword So, just got positive for Covid, how y’all doing?

As the title says, I’m positive, that means I’m stuck in my room for the next 15 or so days, so just to pass time a bit I thought I’d ask how you fellow people are doing
Anything good going on?
submitted by xtreme_sword to CasualConversation [link] [comments]


2022.01.21 20:36 DopelessHopefeand Good ole fashioned Shawladays!!!

Good ole fashioned Shawladays!!! submitted by DopelessHopefeand to velvethippos [link] [comments]


2022.01.21 20:36 ThiatGuy Can anybody that transferred their team to next gen help me with a quick question?

I know milestones and objectives reset, just curious if the rivals and SB progress for the week will reset?
Thanks!
submitted by ThiatGuy to NHLHUT [link] [comments]


2022.01.21 20:36 OnToNextStage Sitting here with a playset of almost every Dark Irregulars card, trying to make a Premium deck

Sitting here with a playset of almost every Dark Irregulars card, trying to make a Premium deck submitted by OnToNextStage to cardfightvanguard [link] [comments]


2022.01.21 20:36 j3rgan Posting here daily until I get a gf: Day 602

I wonder if I am the one with the most posts on this sub
submitted by j3rgan to teenagers [link] [comments]


2022.01.21 20:36 DoctorKartoffel Invest in guy realising his fate.

Invest in guy realising his fate. submitted by DoctorKartoffel to MemeEconomy [link] [comments]


2022.01.21 20:36 CosmicNeutral Okay, I know this subreddit has already been bombarded with frog posts, but I still wanted to share my build a bear date with you guys!

Okay, I know this subreddit has already been bombarded with frog posts, but I still wanted to share my build a bear date with you guys! submitted by CosmicNeutral to buildabear [link] [comments]


2022.01.21 20:36 Responsible_Thing565 parents :/

My parents just acted like it was a normal day on my birthday and I got so emotional. Mom saw me crying but I just got scolded again for crying? They never asked me why I cried or anything. I just went to work on my bday and came back and no cakes, nothing. I had to remind them to wish me at 12 too. I wish they were more affectionate? I am the only child AND I feel like they never show love. ofc they love me but you need to be able to show it too right? I tried talking to my mom about it but she legit got mad about me not understanding that they love me blah blah.
submitted by Responsible_Thing565 to Vent [link] [comments]


2022.01.21 20:36 QueeLinx Ordinary polygon choropleth map now reveals what is going on in our cities. Simple blend of Micrsosoft building footprints reminds us that there's real people associated with this @LivingAtlas map of predominant housing type. Jim Herries on Twitter

Ordinary polygon choropleth map now reveals what is going on in our cities. Simple blend of Micrsosoft building footprints reminds us that there's real people associated with this @LivingAtlas map of predominant housing type. Jim Herries on Twitter submitted by QueeLinx to USCensus2020 [link] [comments]


2022.01.21 20:36 Vegetable-Push2453 How do you feel right now? Are you happy? If not, is there anything you can do to feel happier?

submitted by Vegetable-Push2453 to AskReddit [link] [comments]


2022.01.21 20:36 PocketTroll Locked seatbelt fix! (2019 Nissan Versa)

Recently got into a wreck and my front seatbelts locked up on me. Is there a way I can quick fix it or do I have to replace the seat belts?
submitted by PocketTroll to CarHelp [link] [comments]


2022.01.21 20:36 SnowySupreme She says she like me and her friend says she likes me but if I flirt she doesn't seem to like it.

She said she isn't ready for a relationship. we were walking in a group and we were in the behind. I said "whats cookin good lookin" to strike up a convo but she giggled awkwardly and ran to our friend in the front. i just naturally slided to the right and it killed my mood. She also barely talks to me (or notice me) when I'm we're physically near but talks fine when we text.
submitted by SnowySupreme to Crushes [link] [comments]


2022.01.21 20:36 treydweid 2022 Rookies

I’ve been trying to think of what rookie cards will be in 2022 UFC product. It’ll be hard to beat the 2021 rookie lineup of Ciryl Gane, Khamzat, Brandon Moreno, Magomed Ankalev, Askar Askarov, Michael Chandler, Bryce Mitchell, Merab Dvalishbili, and Kevin Holland, among others. Any guesses or hopes for rookies this year?
submitted by treydweid to UFCtradingcards [link] [comments]


2022.01.21 20:36 TheBoysofTarkov [NA/EU]The Boys [Sherpas] [Tournaments] [Giveaways] [MAX Server Boost] DISCORD

discord.gg/escapefromtarkov
You're on this subreddit for one of several reasons, and I can promise you - here in The Boys, we can handle just about all of them. Tired of having to take on that squad all on your own? Create a voice call (which you can customize the max capacity of with one click) and watch it fill up with people there for the same reasons as you. Be that 4 man squad you're always worried about. New to the game, or stuck on a task? We're here to be that guidance system with a team of active and dedicated sherpas and informed members. Just want to meet some friendly people to run with? We're not 'The Boys' for nothing! We've got you covered on all fronts. We're here to make your experience on Tarkov something you enjoy every time you boot it up. Join us and turn this game from what used to feel like the Dark Souls of shooters, into a game you thrive in and get all the loot you'd ever want.
Looking for that short and sweet TL;DR? We've got that covered, too. Here's what we offer;
1.) Guidance and information about anything you need.
2.) Fun experiences and strong teamwork.
3.) Clear and focused communication.
4.) A text channel hub with keysets for all maps, ammo charts, and more.
5.) Sweet, sweet rubles.
Just click the link already.
https://discord.com/invite/escapefromtarkov
submitted by TheBoysofTarkov to EFT_LFG [link] [comments]


2022.01.21 20:36 fupamancer Meat L'Oof

Meat L'Oof submitted by fupamancer to dankmemes [link] [comments]


2022.01.21 20:36 BeginningActuator8 I NEED HELP

i want to buy one tomorrow is it a good idea or not ? and the release has happend but i cant see them because they are all the same
submitted by BeginningActuator8 to hapebeast_unofficial [link] [comments]


2022.01.21 20:36 Pr0066 Pleasantly surprised with how well the Delhi Airport was being managed

So, long story short, I am having to travel to India on an emergency so took an Air Canada flight on Thursday (20th Jan). The flight itself was non eventful, so kudos to Air Canada who got all my baggage in one piece.
Now, I have had terrible experiences at Delhi (and at Delhi Airport) and I try and avoid it as much as possible. However, everything was ridiculously smooth upon landing.

  1. Immigration - Under 5 minutes
  2. Baggage was already there when I went to pick it up
  3. Customs - Absolutely flew through it.
  4. Connecting to domestic flight - Boom, done
  5. Check into Lounge - Done
Albeit, my domestic flight was at the same terminal, which helped. However the most kudos was to security personnel checking Air Suvidha and Boarding passes. Amazingly well done.
In the past I have been very critical of the attitude within the Airport but it seemed as if folks were really trying to help. It also perhaps helped that I am very respectful to anyone doing their job, be it doing my security check or cleaning the lounge. A thank you also goes a long way.
Now, was everything all good? No, but most of the issues were being caused by travellers. People ignoring masks - I straight up call them out. People blocking path by keeping their luggage right in between (I pretend to trip and land on them).
I also can see that the airport needs a massive facelift. It was great when it was made, right now it's looking run down. It's the capital of the country, please for love of God (and Chacha) please change those ugly carpets.
submitted by Pr0066 to india [link] [comments]


2022.01.21 20:36 deathray1611 Am I reaching too far here, or is this a legit homage? (SPOILER WARNING FOR SYSTEM SHOCK 2! IF YOU HAVEN'T PLAYED IT - DON'T OPEN AND GO GET IT ASAP)

If you know, you know.
So I was exposed to this via clip from a wonderful streamer KathyAlex from their Alien: Isolation playthrough, where they made an interesting observation, that seems to me too intentional to be a simple coincidence considering the apparent and a very strong influence System Shock series had on this game and the little nods to that series that can be found in Isolation.
The clip in question:
Alien Isolation homage to System Shock 2
To anyone who's too lazy to open a link and/or has a terrible memory of what happened in System Shock 2, basically (HEAVY SPOILERS): the screenshot on the right is of a corridor leading to a room where a major story twist/reveal happens in System Shock 2, which is like, really good and amazingly executed and all that.
Idk, I just thought this is really cool, especially as both a fan of Alien: Isolation and System Shock 2. What are your thoughts?
submitted by deathray1611 to alienisolation [link] [comments]


2022.01.21 20:36 Boba_Fett_boii Tiny 3D printed Stug

Tiny 3D printed Stug submitted by Boba_Fett_boii to BlessedTanks [link] [comments]


http://mokum-snacks.ru