Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Blinkit v2.3 - Blink Logitech devices
With this latest version it is posible to blink Logitech devices on steem related actions
- Loading branch information
Showing
20 changed files
with
605 additions
and
29 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"username":"mkt","votes":{"received":4172}} | ||
{"username":"techtek","votes":{"received":6651}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"username":"mkt","votes":{"received":4172}} | ||
{"username":"techtek","votes":{"received":6651}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
255 255 255 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
150 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
C:\Program Files\Logitech Gaming Software\SDK\LED\x86 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
" "price_usd": "2.24585", " | ||
" "price_usd": "1.86967", " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
" "price_usd": "2.99024", " | ||
" "price_usd": "2.76541", " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
LED | ||
Picture |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
'||''|. '||' '||' '|. '|' '||' |' '||' |''||''| | ||
|| || || || |'| | || .' || || | ||
||'''|. || || | '|. | ||'|. || || | ||
|| || || || | ||| || || || || | ||
.||...|' .||.....| .||. .|. '| .||. ||. .||. .||. | ||
|
||
USB Flash Notifications Version 2.3 | ||
Made by Techtek https://steemit.com/@techtek/ | ||
|
||
Logitech code is developed by Flash4yard https://steemit.com/@flash4yard/ | ||
|
||
Starting... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
@echo off | ||
|
||
:: Take and put the username from username.txt and put it in variable %username% | ||
set /p steemusername=<config\username.txt | ||
|
||
:: Check if a sound notification is set On/Off, stored in \config\ and put it into variable %soundsetting% | ||
set /p soundsetting=<config\soundsetting.txt | ||
|
||
:: Get the sound set by the user in the Blinkit GUI, stored in \config\ and put it into variable %sound% | ||
set /p sound=<config\sound.txt | ||
|
||
|
||
|
||
:: Colour settings | ||
set ESC= | ||
set Red=%ESC%[31m | ||
set White=%ESC%[37m | ||
set Green=%ESC%[32m | ||
set Magenta=%ESC%[35m | ||
set Blue=%ESC%[94m | ||
|
||
:: Display welcome message to the user welcome.txt | ||
type config\welcomelogitech.txt | ||
|
||
|
||
|
||
:: Let the user know that Blinkit is going to watch for Followers by displaying the text: | ||
echo Blinkit - Steem Account Followers | ||
|
||
:: Let the user know a sound is being played by displaying the text: | ||
echo. | ||
echo %Magenta%Testing %White%Play sound... | ||
|
||
:: Play and test Sound notification | ||
set /p sound=<config\sound.txt | ||
set "file=sounds\%sound%" | ||
( echo Set Sound = CreateObject("WMPlayer.OCX.7"^) | ||
echo Sound.URL = "%file%" | ||
echo Sound.Controls.play | ||
echo do while Sound.currentmedia.duration = 0 | ||
echo wscript.sleep 100 | ||
echo loop | ||
echo wscript.sleep (int(Sound.currentmedia.duration^)+1^)*1000) >sounds\sound.vbs | ||
|
||
if %soundsetting%==On (start /min sounds\sound.vbs) else (echo Sound notifications are turned off) | ||
echo. | ||
|
||
|
||
|
||
:: Test the Logitech blink action | ||
echo %Magenta%Testing %White%Blink led | ||
start logitechblink.exe | ||
echo. | ||
|
||
|
||
:: Download the latest STEEM and SBD Price and put it inside a txt files | ||
powershell -Command "Invoke-WebRequest https://api.coinmarketcap.com/v1/ticker/steem/ -OutFile config\steemprice.txt" | ||
powershell -Command "Invoke-WebRequest https://api.coinmarketcap.com/v1/ticker/steem-dollars/ -OutFile config\sbdprice.txt" | ||
|
||
:: Find and display the latest STEEM and SBD Price in USD from the downloaded txt files | ||
echo Steem Price | ||
for /F "delims=" %%a in ('findstr /I ""price_usd"" config\steemprice.txt') do set "batToolDir0=%%a" | ||
for /F "delims=" %%a in ('findstr /I ""price_usd"" config\sbdprice.txt') do set "batToolDir2=%%a" | ||
echo %Blue%Steem: "%batToolDir0%" | ||
echo %Blue%Steem Dollar: "%batToolDir2%" | ||
|
||
:: Update the STEEM and SBD price in USD into txt files for the steem prices in the Blinkit interface | ||
echo "%batToolDir0%" > "config\steempricestriped.txt" | ||
echo "%batToolDir2%" > "config\sbdpricestriped.txt" | ||
echo. | ||
|
||
:: Display Steem username | ||
echo %White%Steem Username | ||
echo %Blue%%steemusername%%White% | ||
echo. | ||
|
||
:: Download the number of Followers from a user inside a txt file | ||
powershell -Command "Invoke-WebRequest https://api.steem.place/getFollowersCount/?a=%steemusername% -OutFile config\displayfollowers.txt" | ||
|
||
:: Display the downloaded followers | ||
echo %White%Followers%Blue% | ||
type config\displayfollowers.txt | ||
echo. | ||
|
||
:: Display the saved Username and let the user know that the program is starting | ||
echo. | ||
echo %White%Preparing BlinkIt, | ||
echo Notifications for %Blue%%steemusername%%White% on Logitech ... | ||
timeout 4 | ||
|
||
|
||
:: Blinkit Followers Script | ||
|
||
:: Download followers data from Web Api and save it into a txt file | ||
powershell -Command "Invoke-WebRequest https://api.steem.place/getFollowersCount/?a=%steemusername% -OutFile config\download.txt" | ||
|
||
:main | ||
:: Download followers data from Web Api and save it into a txt file | ||
powershell -Command "Invoke-WebRequest https://api.steem.place/getFollowersCount/?a=%steemusername% -OutFile config\download2.txt" | ||
|
||
:: Compare the 2 downloaded follower txt files if different go to "notification", if the files are the same go to "next" | ||
fc config\download.txt config\download2.txt > nul | ||
if errorlevel 1 goto notification | ||
if errorlevel 0 goto next | ||
|
||
|
||
:next | ||
:: let the user know the program is running by displaying the text: | ||
echo. | ||
echo %Magenta%Blinkit is running... | ||
|
||
:: Download new data to compare, into "download2.txt", and go back to "main" to compare the files again | ||
powershell -Command "Invoke-WebRequest https://api.steem.place/getFollowersCount/?a=%steemusername% -OutFile config\download2.txt" | ||
goto main | ||
|
||
|
||
:notification | ||
:: Let the user know, there is a new Follower! by displaying the text: | ||
echo Blinkit is running... %Blue%NEW FOLLOWER for %steemusername%! | ||
echo %White% | ||
echo %Magenta%ACTION LED BLINKED! | ||
|
||
:: Let the user know, there is a new Follower, and blink the Logitech device | ||
start logitechblink.exe | ||
|
||
:: Play the notification sound if turned on by the user | ||
if %soundsetting%==On (start /min sounds\sound.vbs) else (echo Sound notifications are turned off) | ||
echo. | ||
timeout 3 | ||
echo %White% | ||
|
||
:: Download new data to compare, and go back to "main" and continue to look for for new Followers. | ||
powershell -Command "Invoke-WebRequest https://api.steem.place/getFollowersCount/?a=%steemusername% -OutFile config\download.txt" | ||
goto main |
Binary file not shown.
Oops, something went wrong.